这样可以传递数据,使用location.search可以得到2

解决方案 »

  1.   

    http://lucky.myrice.com/javascriptexam/QueryString.htm
      

  2.   

    不一定要用location.search...正则处理location.href可以得到任何位置的URL参数..
    http://[email protected]/muzix/?from=1&num=9
      

  3.   

    相当于使用form用get方式传递的数据
      

  4.   

    是用javascript實現的
    真正的内容在:http://catconan.nease.net/homeless/homelessX_contentY.js通過函數GetParam得到url參數
    <script>
    var param = GetParam();
    </script>函數在
    http://catconan.nease.net/main.js
    function GetParam()
    {
    var x = document.location.href;
    var y=""
    if (x.indexOf("?")>0)
    {
    y = x.substring(x.indexOf("?")+1,x.length)
    }
    else
    {
    y = "0";
    }
    return y;
    }