how to get <head>
content of the current page
views:
77answers:
2
+4
A:
You can use an element selector to get <head>
, for example:
$("head")
//for example:
alert($("head").html()); //alerts the <head> children
Nick Craver
2010-08-28 21:13:15
This site http://jsfiddle.net is awesome.
faressoft
2010-08-28 23:22:15
+3
A:
You could use the javascript DOM API like this:
var headContent = document.getElementsByTagName('head')[0].innerHTML;
patrick dw
2010-08-28 21:22:24