Javascript examples for jQuery Method and Property:html
Create inner HTML of <P> element
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ console.log($("p").html()); });//from w w w . j a v a 2 s . co m }); </script> </head> <body> <button>Return the content of the p element</button> <p>This is a <b>paragraph</b>.</p> </body> </html>