<script type="text/javascript">
function initFade(){
var windowbg = document.getElementById("fade");
//windowbg.id = "windowbg";
with(windowbg.style) {
// position = "fixed";
position = "absolute";
background = "#fff";
width = document.documentElement.scrollWidth+"px";
clientHeight= document.documentElement.clientHeight;
scrollHeight = document.documentElement.scrollHeight;
if(scrollHeight > clientHeight){
height = document.documentElement.scrollHeight+"px";
}else{
height = document.documentElement.clientHeight+"px";
}
top = "0px";
left = "0px";
filter="Alpha(opacity=50)";
opacity = 0.5;
zIndex=999;
}
}
</script>这一段代码是做的一个弹出层的,但是在ie下老弹出syntax error的错误,在第一行。。谁能告诉我哪里错了???
function initFade(){
var windowbg = document.getElementById("fade");
//windowbg.id = "windowbg";
with(windowbg.style) {
// position = "fixed";
position = "absolute";
background = "#fff";
width = document.documentElement.scrollWidth+"px";
clientHeight= document.documentElement.clientHeight;
scrollHeight = document.documentElement.scrollHeight;
if(scrollHeight > clientHeight){
height = document.documentElement.scrollHeight+"px";
}else{
height = document.documentElement.clientHeight+"px";
}
top = "0px";
left = "0px";
filter="Alpha(opacity=50)";
opacity = 0.5;
zIndex=999;
}
}
</script>这一段代码是做的一个弹出层的,但是在ie下老弹出syntax error的错误,在第一行。。谁能告诉我哪里错了???
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货