超简单的jquery的AJAX用法_jquery
程序员文章站
2022-04-10 23:07:54
...
包括POST,GET,AJAX
前台调用
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文件)
前台调用
复制代码 代码如下:
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文件)
复制代码 代码如下:
上一篇: cookie用法
下一篇: JS实现多物体运动的方法详解