var pos,str,para,parastr,tempstr1;<br />
tempstr="";<br />
str = window.location.href;<br />
pos = str.indexOf("?")<br />
parastr = str.substring(pos+1);<br />
document.write("<br />文件路径:"+str);<br />
if (pos>0){<br />
document.write("<br />所有参数:"+parastr);<br />
}<br />
else<br />
{<br />
document.write ("无参数");<br />
}<br />
if (str.indexOf("&")>0){<br />
para = parastr.split("&");<br />
for(i=0;i<para .length;i++)<br />
{<br />
tempstr1 = para[i];<br />
pos = tempstr1.indexOf("=");<br />
//document.write (tempstr1.substring(0,pos));<br />
document.write ("<br />参数"+i+":"+tempstr1.substring(0,pos));<br />
document.write ("等于:"+tempstr1.substring(pos+1));<br />
}<br />
}<br />
</script>


