求助ie 错误 syntax error

zt234380807 2012-08-09 11:25:03
<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的错误,在第一行。。。。。谁能告诉我哪里错了???
...全文
305 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zt234380807 2012-08-09
  • 打赏
  • 举报
回复
代码太多了贴不上,js就那点代码了!!!其他浏览器都ok,就ie有问题!!!!
happy0000 2012-08-09
  • 打赏
  • 举报
回复
你要把整个代码贴出来啊,包括html和调用函数

87,991

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧