HTML页面调用ASP参数的方法

有时候由于编程的要求,我们需要在ASP的包含文件中调用动态文件,这个时候程序员要怎么进行调用呢?别着急,下面是中国E盟技术频道小编为大家带来的HTML页面调用ASP参数的方法。

<scriptlanguage="JavaScript"type="text/javascript">
varpos,str,para,parastr,tempstr1;
tempstr="";
str=window.location.href;
pos=str.indexOf("?")parastr=str.substring(pos+1);
document.write("<br>文件路径:"+str);
if(pos>0)
{
document.write("<br>所有参数:"+parastr);
}

else
{
document.write("无参数");
}


if(str.indexOf("&")>0)
{
para=parastr.split("&");
for(i=0;i<para.length;i++)
{
tempstr1=para[i];

pos=tempstr1.indexOf("=");
//document.write(tempstr1.substring(0,pos));
document.write("<br>参数"+i+":"+tempstr1.substring(0,pos));
document.write("等于:"+tempstr1.substring(pos+1));
}
}
</script>

上文是关于HTML页面调用ASP参数的方法,相信大家都有了一定的了解,想要了解更多的技术信息,请继续关注中国E盟技术频道吧!