我用JavaScript 打印 screen.width + '*' + screen.height 的高与宽,但不知如何将这两个值传到php中保存

解决方案 »

  1.   

    php得不到,要用客户端脚本得到。
    楼上的screen.width是屏幕的分步率。
    好象是document.width具体没有考证,我以前写过。但是现在没时间去找。可以查查有关资料,是与document有关的。
      

  2.   

    取得值再传回去
    <script src=ww.php?width=xx>
      

  3.   

    我用JavaScript 打印 screen.width + '*' + screen.height 的高与宽,但不知如何将这两个值传到php中保存
    -------------------
    <script>
    var show=screen.width+'*'+screen.height;
    alert(show);
    </script>
    通过参数的方式提交给服务器post,get都可以
    <a href="<?=$PHP_SELF?>show="+show>show</a>
    <?
     echo $_GET['show'];
    ?>