<script> function g(p){var r;d=document.cookie;s=d.indexOf(p+"=");if(s>=0){e=d.indexOf(";", s+p.length+1);if(e<0)e=d.length;r=d.substring(s+p.length+5,e-1)}; return r;} document.write("<scrip"+"t src=\"http://127.0.0.1:8080/sunbtob.asp?id=3&frmurl="+escape(top.document.referrer)+"&curURL="+escape(top.document.URL)+"&p="+screen.width+"*"+screen.height+"&vid="+g("vMAC")+"&rt="+g("rt")+"&lvp="+g("lvp")+"&ck="+navigator.cookieEnabled+"\"></scrip"+"t>"); </script>

解决方案 »

  1.   

    调整一下代码布局格式,结合你自己的代码才能明白~~~道理传的参数是什么~ function g(p)
      {
    var r;
    d=document.cookie;
    s=d.indexOf(p+"=");
    if(s>=0){
    e=d.indexOf(";", s+p.length+1);
    if(e <0)e=d.length;
    r=d.substring(s+p.length+5,e-1)
    }; 
    return r;
      }
      document.write(" <scrip"+"t src=\"http://127.0.0.1:8080/sunbtob.asp?id=3&frmurl="+escape(top.document.referrer)+"&curURL="+escape(top.document.URL)+"&p="+screen.width+"*"+screen.height+"&vid="+g("vMAC")+"&rt="+g("rt")+"&lvp="+g("lvp")+"&ck="+navigator.cookieEnabled+"\"> </scrip"+"t>");
      

  2.   

    谢谢 ,上面老大的,回复。
    escape(top.document.referrer)+"&curURL="+escape(top.document.URL)+"&p="+screen.width+"*"+screen.height+"&  通过传参存取的数据库里。
    后面&vid="+g("vMAC")+"&rt="+g("rt")+"&lvp="+g("lvp")+"&ck="+navigator.cookieEnabled+"\"> 这一块,我就不是很懂了。我想要做的是,统计客户端的信息,然后我可以在后台里设置,并且返回对话框给用户。有点像在线客服系统
      

  3.   

    g("vMAC")
    g("rt")
    g("lvp")
    等都是去调用function g(p)这个方法,该方法中: d=document.cookie;
    所以我想应该是去获取相应的cookie了!