javascript脚本判断网页分辨率:
var a=screen.width;//宽度
screen.height //高度
根据分辨率加载不同的flash:
<scripttype="text/javascript">
if(screen.width>1100)
Insert_Flash('flashcontent',"1280.swf","100%",105);
else
Insert_Flash('flashcontent',"1024.swf","100%",105);
</script>
取得当前页面宽度和高度:
<scripttype="text/javascript">
<!--
vara=document.body.clientWidth;
varb=document.body.clientHeight;
alert("当前页面宽度:"+a+",高度:"+b);
//-->
</script>
ie全屏页面(无滚动条)为分辨率-4,即1020或者1276.
本文介绍了一种使用JavaScript来检测浏览器分辨率的方法,并根据分辨率的不同加载相应的Flash内容。此外,还提供了一个简单的示例用于获取当前页面的宽度和高度。

被折叠的 条评论
为什么被折叠?



