document.getElementById(id)\n"; 如果是想获取传递过来的id的对象就不用要用"'"单引号应该你是想取值吧
$OUTPUT .=" var uid= document.getElementById(id).value\n";
$OUTPUT .="  alert(uid)\n"; 
$OUTPUT .="  var imgWindow = window.open('windows_pri?uid='+uid, 'windows', 'width=320,height=240,scrollbars=no')\n"; windows_pri.php里面:
$uid = $_GET['uid'];

解决方案 »

  1.   

    客户端向服务器端传值,可考虑用AJAX
      

  2.   

    楼上说的没错! js在客户端执行,PHP在服务器端,只有通过ajax
      

  3.   

    可以用ajax方法
    或者在form里头弄个hidden,在post form时候就把这个变量传回去了,(这招比较麻烦,而且要有用form时候才好用)
      

  4.   

    $uid=$_REQUEST['uid'];得到通过ie里传过来的参数
      

  5.   

    var xmlHttp;
    var subTag = false;
    function createXMLHttpRequest(){
    if(window.ActiveXObject){
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }else if(window.XMLHttpRequest){
    xmlHttp = new XMLHttpRequest();
    }
    }
    function startRequest(o){
    createXMLHttpRequest();
    xmlHttp.onreadystatechange = handleStateChange;
    xmlHttp.open("GET","checkCode.php?codes="+o,true);//这里get方式传值
    xmlHttp.setRequestHeader("If-Modified-Since","0");
    xmlHttp.send(null);
    } function handleStateChange()
    {    
    if(xmlHttp.readyState==4){
    if(xmlHttp.status == 200){
    if(xmlHttp.responseText == 'false'){
    alert("验证码不正确");
    subTag = false;
    }else{
    document.form1.submit();
    subTag = true;
    }
    }
    }
    }

    function checkAdd(){
    var o = document.getElementById("checkCode");
    startRequest(o.value);
    return subTag;
    }