Wednesday, 10 April 2013

Jquery Html Append



<!DOCTYPE html>
<html>
<head>
  <style>
  p { background:yellow; }
</style>
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
  <p>I would like to say: </p>
  <div id="mydiv"></div>
<script>
  $("p").append("<strong>Hello</strong>");
  $("#mydiv").append("<p><strong>Hello</strong></p>");
  
</script>

</body>
</html>
Reactions:

0 comments:

Post a Comment

Leave a comment on blog quality.

Blogger

Related Posts Plugin for WordPress, Blogger...