日期:2014-05-17  浏览次数:20490 次

在asp.net页面中嵌入一asp(或jsp)页面,怎样然asp(或jsp)页面内的响应发送到自己指定(或对应)的网页进行处理
在asp.net页面中嵌入一asp(或jsp)页面,怎样然asp(或jsp)页面内的响应发送到自己指定(或对应)的网页进行处理,而不返回到asp.net页面的form对应的后台。

------解决方案--------------------
用jquery的ajax方式如下,首先要引用jquery:
<script src="Js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script>
function ajaxPost(){
$.ajax({
type: "POST",
cache: false,
url: "SaveAsTxt.asp",//这里的url可以指定为处理响应的asp、jsp、aspx、php等页面
data: "txtContent=" + $("#ul_log").html(),//传递的参数,自己改吧
dataType: "html",
success: function (response) {
alert(response);//response是处理页面返回来的消息
},
error: function () {
alert("error");
}
});
}
</script>