-1
我即将保存用户设备的分辨率。但是,虽然我想处理信息抛出JavaScript它不是创建。我的代码在下面。Javascript发送用户屏幕分辨率,而身体onload
<?php
function sar($opt='re', $k=g){
if($k==p){
$s=$_POST; }
elseif($k==g){
$s=$_GET; }
elseif($k==s){
$s=$_SERVER; }
if(isset($s[$opt])){
return $s[$opt]; }
else return 0; }
$head='<!DOCTYPE html>
<html><head><script>
function showCustomer(){
var width=screen.width
var height=screen.height
var color=screen.colorDepth
var xmlhttp;
if (str==""){
document.getElementById("result").innerHTML="";
return;}
if(window.XMLHttpRequest)
{ xmlhttp=new XMLHttpRequest(); }
else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4 && xmlhttp.status==200){
但是,这是我已经提供了一种方法来检测JS的形式解决一个可怕的问题。 – Starx 2013-02-19 04:35:30
我的代码格式不正确。所以这是在评论。请原谅。 document.getElementById(“result”)。innerHTML = xmlhttp.responseText; (“GET”,“isp.php?w =”+ width + h =“+ height + c =”+ color,true);}} }} xmlhttp.open xmlhttp.send(); } <体的onload = “showScreen()”>