Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ x=$("p").get(0); $("div").text(x.nodeName + ": " + x.innerHTML); }); }); </script> </head> <body> <p>This is a paragraph</p> <button>Get the p DOM element</button> <div></div> </body> </html>
Result:
W3Schools.com - Try it yourself