要它显示不显示,不要它显示却显示,在线等代码
效果如CCTV.com,如果分辨率为800×600则tableright层的内容不显示,其他则显示该层的内容。代码如下:
<script language="javascript">
if((window.screen.width == 800) && (window.screen.height == 600)){
document.getElementById("tableright").style.display="none";
}else{
document.getElementById("tableright").style.display="";
}
</script>
<div id=tableright style="display:none;Z-INDEX:1; LEFT:768px; WIDTH:200px; POSITION: absolute; TOP:0px; HEIGHT:8px">
123456789。。。。
</div>
请大家指导,马上揭帖!