I need to open a web page that is somehow missing <html>...</html>
. That is, the page content is only:
<head>
...
</head>
<b开发者_开发知识库ody>
...
</body>
without the enclosing HTML tags.
Firefox is willing to render this page, but not Chrome. I want to use userscript to fix it.
But since head and body has no parent, I can't insert anything before&after them.
Any idea how to do it? Thanks!
I don't think this will solve your issue or not. Please try this using jQuery :
$(document).ready(function(html){
html = '<html>' + html + '</html>';
});
where html is the page without html tags.
See this.
精彩评论