日期:2014-05-18 浏览次数:20585 次
var XmlHttp1 = getXmlhttp();
    XmlHttp1.open("Get", "test.asp?value="+value+"&lx="+lx,true);
    XmlHttp1.send(null);
var x =XmlHttp1.responseText;
document.getElementById('aa').value=x;
------解决方案--------------------
用AJAX获取,也可以用AJAX发送的~~~
------解决方案--------------------
晕,你用的是这个个
那更简单了JS做下下面修改
window.onload=function(){ 
    //获取数据 
    var XmlHttp = getXmlhttp(); 
    XmlHttp.open("Get", "test.asp?url=http://www.baidu.com", false); 
    XmlHttp.send(null); 
var t  = unescape(XmlHttp.responseText) 
var obj  =  document.getElementById("tt1") 
obj.innerHTML  =  t;
sendshow(t)//调用传给后台
var  arr  =  obj.getElementsByTagName("div"); 
alert("网页里所有的div集合共有:"+arr.length+"个!"); 
}; 
function sendshow(value){
 var XmlHttp = getXmlhttp(); 
    XmlHttp.open("Get", "creat.asp?value="+value, false); 
    XmlHttp.send(null); 
}
------解决方案--------------------
噢,用ASP获取到是可以~  
AJAX可以用get或post方式发送给后台, 5楼正解
------解决方案--------------------
内容大用post
function sendshow(value){
 var XmlHttp = getXmlhttp(); 
    XmlHttp.open("post", "creat.asp", false);
    XmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=utf-8');
    XmlHttp.send('value='+encodeURIComponent(value)); 
}
------解决方案--------------------
<INPUT id="name1" type="hidden" runat="server">
------解决方案--------------------
就用我跟你说的方法啊
直接在test.asp这个页面就生成了,不需要在另外用程序了
------解决方案--------------------
不用AJAX,把数据给一个隐藏的表单,提交到一个隐藏的iframe也一样~
------解决方案--------------------
不用那么麻烦,用个隐藏域就搞定<input type="hidden" name="method" value="" ruant=“server”/>
------解决方案--------------------
前台传值,后台调,不用写了吧
------解决方案--------------------