Javascript获取URL参数方法
<script type="text/javascript">
function Request(name,url)
{
return (new RegExp("(\\?|&)"+name+"=([^&]*)").exec(url))?RegExp.$2:""
}
var str=window.location.href;
alert(Request('s',str));
alert(str);
</script>
<script type="text/javascript">
function Request(name,url)
{
return (new RegExp("(\\?|&)"+name+"=([^&]*)").exec(url))?RegExp.$2:""
}
var str=window.location.href;
alert(Request('s',str));
alert(str);
</script>