javascript - clearing div content through php and ajax -


  echo '<script type="text/javascript" src="../jquery.js"  src="../play.js">    $("#txtcreatureinfo").remove(); </script>'; 

i wondering why id not working. have line in php file , need remove text inside div . using ajax , all.

if want remove text inside div, cannot use .remove(). .remove() delete element. instead should use .html(""). clear text , not remove div.

so can write way.

echo '<script type="text/javascript">$("#txtcreatureinfo").html("");</script>'; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -