lofaifa Posted March 14, 2012 Share Posted March 14, 2012 i have this tag : <p class="test"></p> i wanna fill up this tag with data from an ajax file .. i tried this : function rate(value){ var rate=value; $.post('public/ajax/rate.php',{rate:rate},function(data){ //nothings wrong with beta var beta=data; $('.test').attr('value',beta); }); } doesnt work ! Link to comment https://forums.phpfreaks.com/topic/258937-fill-a-tag-using-javascript/ Share on other sites More sharing options...
smerny Posted March 14, 2012 Share Posted March 14, 2012 you mean you want to change the inner html of the tag i think? $('.test').html(beta); Link to comment https://forums.phpfreaks.com/topic/258937-fill-a-tag-using-javascript/#findComment-1327431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.