这段代码能兼容I8不能兼容火狐和其他浏览器,这是为什么了?
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.STYLE1 {
font-family: "创艺简老宋";
font-size: 20px;
color: #FFFF00;
}
.STYLE2 {
font-family: "创艺简老宋";
font-size: 20px;
color: #FF0000;
}
.STYLE3 {
font-family: "创艺简老宋";
font-size: 20px;
color: #00CC33;
}
.STYLE4 {
font-family: "创艺简老宋";
font-size: 20px;
color: #FFFFFF;
}
#Layer1 {
position:absolute;
left:275px;
top:93px;
width:164px;
height:167px;
z-index:1;
}
body {
background-image: url(../qiep/zb14.jpg);
}
-->
</style>
<SCRIPT>
function ow(obj) {
URL=obj.href;
width=268;
height=530;
var left = ( screen.width - width ) / 2;
var top = ( screen.height - height ) / 2;
window.open(URL,'','width=268,height=530,top='+top+',left='+left+',scrollbars=0,resizable=0');
return false;
}
</SCRIPT>
</head>
<body>
<DIV id=marquees>
<p> </p>
<p> </p>
<p class="STYLE3"> </p>
<p class="STYLE3"> </p>
<p class="STYLE3"> </p>
<p class="STYLE3"> 以下信息每天更新20条!</p>
<p><A href="n_468.htm" target="_blank" onClick="return ow(this)"> </A> <span class="STYLE2">信息真实敬请留意</span></p>
<p> </p>
<p> </p>
<p><A href="n_468.htm" target="_blank" onClick="return ow(this)"> </A><img src="../zp/zpt/1.jpg" width="260" height="140"><br />
<br />
<BR>
<BR>
<A
href="javascript:"> </A><img src="../zp/zpt/2.jpg" width="260" height="180"><br />
<br />
<br />
<img src="../zp/zpt/3.jpg" width="260" height="180"><br />
<br />
<br />
<img src="../zp/zpt/4.jpg" width="260" height="310"><br />
<br />
<br />
<img src="../zp/zpt/5.jpg" width="260" height="239"><br />
<br />
<br />
<img src="../zp/zpt/6.jpg" width="259" height="253"><br />
<br />
<br />
<img src="../zp/zpt/7.jpg" width="265" height="386"><br />
<br />
<br />
<img src="../zp/zpt/8.jpg" width="260" height="305"><br />
<br />
<br />
<img src="../zp/zpt/9.jpg" width="260" height="287"><br />
<br />
<br />
<img src="../zp/zpt/10.jpg" width="260" height="236"><br />
<br />
<br />
<img src="../zp/zpt/11.jpg" width="260" height="189"><br />
<br />
<br />
<img src="../zp/zpt/12.jpg" width="260" height="161"><br />
<br />
<br />
<img src="../zp/zpt/13.jpg" width="260" height="195"><br />
<br />
<br />
<img src="../zp/zpt/14.jpg" width="260" height="385"><br />
<br />
<br />
<img src="../zp/zpt/15.jpg" width="260" height="434"><br />
<br />
<br />
<img src="../zp/zpt/16.jpg" width="260" height="171"><br />
<br />
<br />
<img src="../zp/zpt/17.jpg" width="260" height="159"><br />
<br />
<br />
<img src="../zp/zpt/18.jpg" width="260" height="250"><br />
<br />
<br />
<img src="../zp/zpt/19.jpg" width="260" height="198"><br />
<br />
<br />
<img src="../zp/zpt/20.jpg" width="260" height="197"><BR>
<BR>
</p>
</DIV>
<SCRIPT language=JavaScript>
marqueesHeight=440;
stopscroll=false;
with(marquees){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
document.write('<div id="templayer" ></div>');
preTop=0; currentTop=0;
function init(){
templayer.innerHTML="";
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
setInterval("scrollUp()",30);//越大越慢
}
document.body.onload=init;
function scrollUp(){
if(stopscroll==true) return;
preTop=marquees.scrollTop;
marquees.scrollTop+=1;
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
marquees.scrollTop+=1;
}
}
</SCRIPT>
</body>
</html>