Jump to content

fill a tag using javascript ?


lofaifa

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.