取地址栏的参数的
<script language="JScript">
<!--
var LocString=String(window.document.location.href);
function GetQueryString(str)
{
var rs=new RegExp("(^|)"+str+"=([^\&]*)(\&|$)","gi").exec(LocString),tmp;
if(tmp=rs)return tmp[2];
return null;
}
alert(GetQueryString("tid"));
-->
</script>
大家能解释一下<!--
var LocString=String(window.document.location.href);
function GetQueryString(str)
{
var rs=new RegExp("(^|)"+str+"=([^\&]*)(\&|$)","gi").exec(LocString),tmp;
if(tmp=rs)return tmp[2];
return null;
}
alert(GetQueryString("tid"));
-->
</script>
(^|)"+str+"=([^\&]*)(\&|$)
这个正则的意思吗??