今天头让我改的页面 新窗口打开html页面,还要替换不同的title 真晕了, 就找上百度 搜索这个 静态页传参数,html穿传参数,就发现了这个
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML><HEAD>
<script language=”JavaScript”>
var pos,str,para,parastr,tempstr1;
tempstr=””;
str = window.location.href;
pos = str.indexOf(“?”)
parastr = str.substring(pos+1);
if (pos>0){
document.write(parastr);
}
else {
document.write (“<br />当前无参数,请在连接后面加入”);
}
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>
<TITLE> <script language=”JavaScript”> document.write(parastr);</script> </TITLE>
<META NAME=”Generator” CONTENT=”CnEve”>
<META NAME=”Author” CONTENT=””>
<META NAME=”Keywords” CONTENT=””>
<META NAME=”Description” CONTENT=””>
<STYLE TYPE=”text/css” TITLE=””>
</STYLE>
</HEAD>
<BODY>
<a href=”http://www.greedbus.com/20120129/863.html” target=”_blank” >html 利用?接受参数-贪婪巴士-月少博客</a>
</BODY>
</HTML>