为何接收不到jquery参数呢

乾宝 2014-06-22 11:02:59
222.html

$.ajax({
type: "POST",
contentType: "application/json",
url: "222.asp",
data: {"id":"123"},
dataType: 'json',
success: function(result) {
alert(result.msg);
}
});


222.asp

<%
dim id
id = Request("id")
Response.Write("{""id"":""显示数字_"& id &"""}")
%>


为何222.asp接收不到id的值呢。
...全文
110 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
乾宝 2014-06-23
  • 打赏
  • 举报
回复
引用 3 楼 xuzuning 的回复:
把 contentType: "application/json", 删去
果然可以用呀。谢谢。
xuzuning 2014-06-22
  • 打赏
  • 举报
回复
把 contentType: "application/json", 删去
乾宝 2014-06-22
  • 打赏
  • 举报
回复
引用 1 楼 xuzuning 的回复:
你 alert(result.msg); 但返回的数据里并么有 msg,只有 id 呀
我写错了。 是alert(result.id); 但是没有显示id
xuzuning 2014-06-22
  • 打赏
  • 举报
回复
你 alert(result.msg); 但返回的数据里并么有 msg,只有 id 呀

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧