Mega Code Archive

 
Categories / JavaScript Tutorial / JQuery
 

Set text and html

< html>   <head>     <script type='text/javascript' src='js/jquery-1.3.2.js'></script>     <script type='text/javascript'> $(document).ready(   function() {     $('p#tmpQuote-1').text("asdf. <i>asdf</i>");     $('p#tmpQuote-2').html("asdf. <i>asdf</i>");   } );     </script>     <style type='text/css'> p.tmpQuote {     background: lightblue; } p#tmpQuote-2 {     background: lightgreen; }     </style>   </head>   <body>     <p>       asdf. <i>asdf</i>     </p>     <p class='tmpQuote' id='tmpQuote-1'>     </p>     <p class='tmpQuote' id='tmpQuote-2'>     </p>   </body> </html>