当前位置:首页 > 编程 > HTML代码 > 正文内容

PHP 当前屏幕宽高

Cristian_Ng1年前 (2025-01-29)HTML代码

<?php

if (isset($_GET['width']) AND isset($_GET['height'])) {

    // output the geometry variables

    echo "Screen width is: " . $_GET['width'] . "<br />\n";

    echo "Screen height is: " . $_GET['height'] . "<br />\n";

} else {

    // pass the geometry variables

    // (preserve the original query string

    //   -- post variables will need to handled differently)


    echo "<script language='javascript'>\n";

    echo "  location.href=\"${_SERVER['SCRIPT_NAME']}?${_SERVER['QUERY_STRING']}"

        . "&width=\" + screen.width + \"&height=\" + screen.height;\n";

    echo "</script>\n";

    exit();

}

?>


“PHP 当前屏幕宽高” 的相关文章

TWCMS inquirysubmit.htm代码

[password]{inc:header.htm} <div class="section">     <div class="breadcrumb-area"> &n...

inc-inquiry.htm

[password]<div class="contact-form-wrapper contact-form">     <form action="/index.php?cat...

setting_control.class.php

[password]路径:/admin/control/setting_control.class.php在// hook admin_setting_control_after.php上面添加    // 询盘接口设置 public ...

admin_control.class.php

admin_control.class.php

[password]路径/admin/control/admin_control.class.php 'setting-inquiry'=>array('name'=>'询盘功能接口', 'p'=>...

文章生成PDF

FUSIONAPP 生成APK的调用浏览器下载PDF文件代码:-- -- @author 寒歌 -- @description Main是应用的主模块,其中注册了应用运行中UI事件的回调、Activity生命周期的回调等 -- 你也可以在此编写...