how to get content of the current page
You can use an element selector to get , for example:
$("head") //for example: alert($("head").html()); //alerts the children
You can give it a try here