Tip: You can modify some of the code before running
JavaScript can turn off the imitation IE top warning bar <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <title>javascript can be turned off by imitation ie top warning strips </title > <meta http-equiv= "content-type" content= "text/html;charset=gb2312" > <!--Add the following code to <pead> and </ Head> between--> <style type= "Text/css" > #informationbar {position:fixed; left:0; width:100%; text-indent:5px; padding:5px 0; Background-color:lightyellow; BORDER-BOTTOM:1PX solid black; Font:bold 12px Verdana; * HTML #informationbar {position:absolute; Width:expression (document.compatmode== "Css1compat"? document.documentelement.clientwidth+ "px": body.clientWidth+ "px"); </style> </pead> <body> <!--Add the following code to the <body> and </body>--> <script type= "text/ JavaScript ' > Function Informationbar () {this.displayfreq= ' Always ' this.content= '} informationbar.prototype. Setcontent=function (data) {This.content=this.content+data document.write (' <div id= ' informationbar ' > ' + this.content+ ' </div> '} informationbar.prototype.animatetoview=function () {var barinstance=this if (ParseInt ( This.barref.style.top) <0) {this.barref.style.top=parseint (this.barref.style.top) +5+ "px" settimeout (function () {Barinstance.animatetoview ()}, M)} else{if (document.all &&!window. XMLHttpRequest) this.barref.style.setExpression ("Top", ' document.compatmode== "Css1compat"? document.documentelement.scrolltop+ "px": body.scrolltop+ "px" ') Else This.barref.style.top=0}} informationbar.close =function () {document.getElementById ("Informationbar"). style.display= "None" if (this.displayfreq== "session") Document.cookie= "infobarshown=1;path=/"} informationbar.prototype.setfrequency=function (type) {this.displayfreq= Type} informationbar.prototype.initialize=function () {if (this.displayfreq== "session" && Document.cookie.indexOf ("InfobarshOwn ") ==-1 | | this.displayfreq== "Always") {This.barref=document.getelementbyid ("Informationbar") This.barheight=parseint ( This.barref.offsetHeight) this.barref.style.top=this.barheight* ( -1) + "px" This.animatetoview ()}} window.onunload= function () {this.barref=null}//invocation code var infobar=new informationbar () infobar.setcontent (' Chinese stationmaster sky, stationmaster constructs the station paradise, URL: http://www.111cn.net immediate access ') infobar.initialize () </script> </body> </ptml>
Tip: You can modify some of the code before running