PHP How to edit HTML element Content? -
just $('#elementid').html('html code');
in php. there way change live content php without reloading page? tried
<?php echo '<script type="text/javascript"> $('#element').html('<p>i text</p>'); </script>' ?> <div id='element'>i changed!</div>
is there shorter way, 1 not works everytime.
$.post('test.php','',function(response){ $('#element').html(res); });
test.php
$name = "sham"; echo "this variable $name";
output of html
<div id='element'>this variable sham</div>
Comments
Post a Comment