.Net结合JQuery实现向aspx后台函数进行请求。
$.ajax({
url:
"Default.aspx/aaaa"
,
async:
false
,
type:
"POST"
,
contentType:
"application/json; charset=utf-8"
,
dataType:
"json"
,
data: {name:
"Tom"
,content:
"hello"
},
success:
function
(data) {
alert(data.d);
},
error:
function
() {
alert(
"error!"
);
}
});
using
System.Web.Services;
using
System.Web.Script.Services;
[WebMethod]
public
static
string
aaaa(
string
name,
string
content)
{
return
name +
":"
+ content;
}
https://www.cnblogs.com/linji/archive/2012/03/22/2411058.html
本博客是个人工作中记录,更深层次的问题可以提供有偿技术支持。
另外建了几个QQ技术群:
2、全栈技术群:616945527
2、硬件嵌入式开发: 75764412
3、Go语言交流群:9924600
闲置域名WWW.EXAI.CN (超级人工智能)出售。
另外建了几个QQ技术群:
2、全栈技术群:616945527
2、硬件嵌入式开发: 75764412
3、Go语言交流群:9924600
闲置域名WWW.EXAI.CN (超级人工智能)出售。