如何判断显示器分辨率?800*600 和1024*768 screen.widthscreen.height如:<script>alert('分辨率为'+screen.width+'*'+screen.height);</script> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.chinabs.net/js/resolution.asp 你这个例子,恐怕得在网站首页放一个隐藏帧,将 screen.width 和 screen.height 发给服务器的 PHP 程序,并记录在 COOKIE 里,以后一直根据页面大小计算 pagesize 1.php<head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body bgcolor="#FFFFFF" text="#000000"><script language="javascript">if(window.screen){var w=screen.width; url_800="2.php?w=800&h=600"; url_1024="2.php?w=1024&h=768";if(w<835){self.location.replace(url_800);}else{self.location.replace(url_1024);}}</script></body></html>2.php<html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><body bgcolor="#FFFFFF" text="#000000"><?echo $user."<BR>";echo $w." X ".$h;?></body></html> 不错,我也会了!谢谢 hflsj(hflsj) 关于php5 的pdo连接oracle的问题,很急,多谢了 求参数详细资料 javascript检验完表单数据后如何传递给php? html wap 输入法 用asp写的一个session值,用php可以读出来吗? 请教session最简单最基本的问题 请教PHP实现安全下载的问题 在程序中使用gz压缩效率如何? 关于文件上传安全性的问题 好不容易将PHP+apache调试成功,却出现如下问题,快来救救我 大家帮忙写个函数,给分100,在线等待. php程序员能拿多少工资
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#FFFFFF" text="#000000">
<script language="javascript">
if(window.screen){
var w=screen.width;
url_800="2.php?w=800&h=600";
url_1024="2.php?w=1024&h=768";
if(w<835){
self.location.replace(url_800);
}
else{
self.location.replace(url_1024);
}
}
</script>
</body>
</html>2.php<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#FFFFFF" text="#000000">
<?
echo $user."<BR>";
echo $w." X ".$h;
?></body>
</html>