Response是asp的服务器端代码,不能用在客户端的js中。
用document.search取得?后的值。

解决方案 »

  1.   

    对不起,写错了,是location.search
      

  2.   

    <html>
    <head><meta name="ContentType" content="text/html" />
    <meta name="CharSet" content="GB2312" /><table><tr><td colspan="4"><input  type="button" value="drawline" onclick="javascript:drawCanvas()"/></td></tr>
    </table><script language="javascript">
    var ff=location.search;
    ff=ff.substr(1,ff.length-1);
    var paras = ff.split("&");
    function getItem(id_name){
    var a;
    for(var i=0;i<paras.length;i++){
        a = paras[i].split("=");
        if(a[0]==id_name) return a[1];
    }
    return "";
    }
    function drawCanvas()
    {document.write(getItem("id"));}
    </script></head>
    <body></body>
    </html>
      

  3.   

    谢谢 hookee ,howtofindyou 你们2位,我正好要用这个,谢谢!