日期:2014-05-18  浏览次数:20383 次

通过静态页面获取动态页传入的ID值是否行得通?
a.aspx
 Response.Redirect("aa.htm?ida=aaaaaa");
aa.htm
怎样在aa.htm页当中获得a.aspx当中的aa.htm?ida的值?
不知这样描述大家能否看懂~~

------解决方案--------------------
see:
JavaScript中获得地址栏参数QueryString
http://www.aspxboy.com/private/showthread.asp?threadid=254
------解决方案--------------------
探讨
see:
JavaScript中获得地址栏参数QueryString
http://www.aspxboy.com/private/showthread.asp?threadid=254

------解决方案--------------------
用ajax
<script type="text/javascript">
//<![CDATA[
var str;
function Ajax(){
var xmlHttp;
try{
xmlHttp = new XMLHttpRequest();
}
catch(e){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
//alert(xmlHttp);
//创建请求处理结果程序
xmlHttp.onreadyStatechange = function(){
if(4 == xmlHttp.readyState){
if(200 == xmlHttp.Status){
str = xmlHttp.responseText;
document.getElementById("code").innerHTML = xmlHttp.responseText;
}
else{
alert("失败");
}
}
}

xmlHttp.open("get","a.aspx"; ",true);
//post时才设的HTTP头
//xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
xmlHttp.send(null);
}
------解决方案--------------------
探讨
引用:
see:
JavaScript中获得地址栏参数QueryString
http://www.aspxboy.com/private/showthread.asp?threadid=254