Or any other tags :)
for eg.
page...
You can try something like:
function getScriptsAsText() {
var div = document.createElement('div');
var scripts = [];
var scriptNodes = document.getElementsByTagName('script');
for (var i=0, iLen=scriptNodes.length; i
It returns a array of the current script elements as text, including their start and end tags.
You might also try outerHTML, but it's not that widely supported.