js post html页面请求疑问

Kenzson 2014-12-27 10:59:32
    $("#btnlogin").click(function() {
b(i) && ($(".btn span").text("登录中..."), $.ajax({
type: "POST",
url: "/m/login.html",
dataType: "json",
data: $("form").serialize(),
success: function(a) {
a && a.Success ? window.location.href = a.ReturnValue.ReturnUrl : null != a.ReturnValue && null != a.ReturnValue.ErrorCount && a.ReturnValue.ErrorCount > 2 ? (i = !0, c(), $.dialog({
style: "tip",
width: 200,
closeTime: 2e3,
content: '<p style="text-align: center">' + a.Message + "</p>"
}).open(), $(".btn span").text("登 录")) : ($.dialog({
style: "tip",
width: 200,
closeTime: 2e3,
content: '<p style="text-align: center">' + a.Message + "</p>"
}).open(), $(".btn span").text("登 录"))
},
error: function() {},
timeout: function() {
$(".btn span").text("登 录"), $.dialog({
buttons: {
"确定": function() {
this.close()
}
},
content: "<p style='text-align: center'>请求超时,请稍后再试</p>"
}).open()
}
}))
})
});



哪位大神看看这里的post url竟然是html页面,这会怎么处理post请求呢
...全文
306 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ajaxfeifei 2014-12-27
  • 打赏
  • 举报
回复
这个你要好好去研究Asp.net的module、httphandler,你就清楚为什么html也能定向到自定义的处理方式了。
  • 打赏
  • 举报
回复
人家后台有能够捕获 login.html 请求的程序。 难道你以为凡是以 .html 后缀结束的请求都是简单的文件下载?

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

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