Javascript examples for jQuery Method and Property:html
InnerHTML vs jQuery html()
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(window).load(function(){/*from www . ja v a2 s.c o m*/ console.log($("div").html()); console.log($("div").eq(2).html()); }); </script> </head> <body> <div> html 1 </div> <div> html 2 </div> <div> html 3 </div> </body> </html>