December 2013
Intermediate to advanced
384 pages
9h 54m
English
var p1Contents = $("#p1").html(); var div1Contents = $("#div1").html();
Containing the content inside an HTML element is easy using the jQuery .html() method. Calling this method with no parameter returns an HTML string version of the content. If the content is just text, the return is a simple string. If the content is HTML elements, the string is included in the HTML tags.
Read now
Unlock full access