站长论坛
标题:
用JS判断当前显示器的分辨率?
[打印本页]
作者:
ajax
时间:
2007-10-6 14:00
标题:
用JS判断当前显示器的分辨率?
<link rel="stylesheet" type="text/css" id="css">
<script language="javascript">
function dis()
{
if((screen.width == 1024) && (screen.height == 768))
{
document.getElementById('css').href = '2.css';
}else if ((screen.width == 800) && (screen.height == 600))
{
document.getElementById('css').href = '1.css' ;
}else
{
document.getElementById('css').href = '2.css';
}
}
dis();
</script>
欢迎光临 站长论坛 (http://www.tzlink.com/bbs/)
Powered by Discuz! X3.2