开发者

How can I remove additional html object on a page

for some very hard reason i get inserted additional ... before the beggining of my page, before my real <head> starts. This comes from another app i cant remove it.

So th开发者_如何学Pythone code looks like this:

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="http://www.facebook.com/#!/nagradnaigra123.si?sk=app_163054567105477">here</a>.</h2>
</body></html>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
... normal content from here on...

So im asking how on earth can i remove the additional head on the begginig of my page. i can edit css, add javascript, jquery, php... but i just dont know the solution to this problem.

Is this possible at all?


Take the body tags out of the head.

Should be

<head>
stuff
<title>Object moved</title>
</head>

<body>
stuff
<h2>Object moved to <a href="http://www.facebook.com/#!/nagradnaigra123.si?sk=app_163054567105477">here</a>.</h2>

</body>


Remove the first <title> and <h2> tags by putting the code below in your <head>. This will make the extra <html> tag at the beginning have no effect on your page.

<script type="text/javascript">
    var e = document.getElementsByTagName( 'title' );
    e[0].parentNode.removeChild( e[0] );
    e = document.getElementsByTagName( 'h2' );
    e[0].parentNode.removeChild( e[0] );
</script>

Works in FireFox, didn't test in other browsers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜