js获取href跳转页面传过来的参数
jq.ajax({
                     type:"get",
                     url:"../ashx/indexLoad.ashx",
                     data:"m=0",
                     async:false,
                     success:function(msg)
                     {
                         var temp=eval("("+msg+")");
                         if(temp.code==1)
                         {
                             for(var i=0;i<temp.message.List.length;i++)
                             {
                                 content+="<li><a href=\"../gonggaodetail.html\?id="+temp.message.List[i].id+"\" target=\"_blank\" title="+temp.message.List[i].title+" href=\"#\"><em>"+temp.message.List[i].title+"</em></a></li>";
                             }
                             content+="</ul>";
                             jq("#gonggao").append(content);
                         }
                     }
                    }),
   Request = {
             QueryString : function(item){
             var svalue = location.search.match(new RegExp("[/?/&]" + item + "=([^/&]*)(/&?)","i"));
             return svalue ? svalue[1] : svalue;
             }
         }
         jq = jQuery.noConflict();
         jq(document).ready(function()
         {
             alert(Request.QueryString('id'));
         })
代码贴出来了,大家帮我看看,这样传参后,为什么是“null”呢,地址栏是对的呀:http://localhost:5965/netShop/gonggaodetail.html?id=3
这是为什么呀?
------解决方案--------------------
JScript code
//var svalue = location.search.match(new RegExp("[/?/&]" + item + "=([^/&]*)(/&?)", "i"));
  var svalue = location.search.match(new RegExp("[/?/&]" + item + "=([^/&]*)(/&)?", "i"));//最后的?放出()来