How to place a HTML content inside a div element in jQuery?

Posted by Poster under jQuery category on | Views : 4645
Lets say you have a div with id as "div1" and you want to replace its current content you can write following code.

<script type="text/javascript">
$("#div1").html("Your html code <font color='red'>The browser version is</font>: <div>" +
$.browser.version + "</div>");

Comments or Responses

Login to post response