欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

超簡(jiǎn)單的jquery的AJAX用法

 更新時(shí)間:2010年05月10日 20:42:20   作者:  
超簡(jiǎn)單的jquery的AJAX用法,需要的朋友可以參考下。
包括POST,GET,AJAX

前臺(tái)調(diào)用
復(fù)制代碼 代碼如下:

jQuery.post("NewDoAjax.aspx", { max: ' N !', name: 'wsenmin' }, function(data) { alert(data) });
jQuery.get("NewDoAjax.aspx", { max: ' B !', name: 'wsenmin' }, function(data) { alert(data) });
var superMan = "max=I am jq &name= it is ajax ";
jQuery.ajax({
type: "POST",
url: "NewDoAjax.aspx",
data: superMan,
success: function(msg) {alert(msg);}
});

C#代碼:(將以下代碼保存為NewDoAjax.aspx文件)
復(fù)制代碼 代碼如下:

<%@ Page Language="C#" ValidateRequest="false" EnableSessionState="True"%>
<%@ Import NameSpace="System.Data.SqlClient" %>
<%@ Import NameSpace="System.Data" %>
<%@ Import Namespace="System.Configuration"%>
<%@ Import Namespace="System.Web.Security"%>
<%@ Import Namespace="System.Drawing"%>
<script type="text/C#" runat="server">
protected void Page_LoadComplete(object sender, EventArgs e)
{
Response.ClearContent();
Response.Clear();
string yy = null;
int count = Request.Form.Count;
int count2 = Request.QueryString.Count;
foreach (var cv in Request.Form)
{
yy += cv + ":"+Request.Form[cv.ToString()].ToString()+" 哈好簡(jiǎn)單|| ";
}
foreach (var cv in Request.QueryString)
{
yy += cv + ":" + Request.QueryString[cv.ToString()].ToString() + " 好簡(jiǎn)單哇哈|| ";
}
Response.Write(yy.Substring(0,yy.Length-4));
Response.End();
}
</script>

相關(guān)文章

最新評(píng)論