静态页面传值
<script language="javascript">
var tmpArr,QueryString;
var URL = document.location.toString();
if(URL.lastIndexOf("?")!=-1){
QueryString= URL.substring(URL.lastIndexOf("?")+1,URL.length);
tmpArr=QueryString.split("&");
for (i=0;i<=tmpArr.length;i++)
{ try{eval (tmpArr[i]);}
catch (e){
var re = new RegExp("(.*)=(.*)","ig");
re.exec(tmpArr[i]);
try{eval (RegExp.$1+"="+"\""+RegExp.$2+"\"");}
catch(e){}
}
}
}
else
{
QueryString="";
}
</script>
<script language="javascript">
document.write ("查询串为:"+QueryString+"<br>");
if (typeof(ID)!="undefined")
{document.write ("ID 值 为:"+ID+"<br>");}
if (typeof(Name)!="undefined")
{document.write ("Name值为:"+Name+"<br>");}
</script>
var tmpArr,QueryString;
var URL = document.location.toString();
if(URL.lastIndexOf("?")!=-1){
QueryString= URL.substring(URL.lastIndexOf("?")+1,URL.length);
tmpArr=QueryString.split("&");
for (i=0;i<=tmpArr.length;i++)
{ try{eval (tmpArr[i]);}
catch (e){
var re = new RegExp("(.*)=(.*)","ig");
re.exec(tmpArr[i]);
try{eval (RegExp.$1+"="+"\""+RegExp.$2+"\"");}
catch(e){}
}
}
}
else
{
QueryString="";
}
</script>
<script language="javascript">
document.write ("查询串为:"+QueryString+"<br>");
if (typeof(ID)!="undefined")
{document.write ("ID 值 为:"+ID+"<br>");}
if (typeof(Name)!="undefined")
{document.write ("Name值为:"+Name+"<br>");}
</script>
微软BI技术交流群:316744959
武汉NET技术群:961108969
NET技术群:21386099
本人具有丰富的系统开发经验,承接系统开发,小程序,NET系统开发,BI开发,有需求联系微信手机:15010195887