开发者

Jquery mobile - how to specify that a link should be ajax-ed with POST

开发者 https://www.devze.com 2023-04-03 05:46 出处:网络
I 开发者_开发知识库have a regular link <a href=\"Auth/LogOut\" data-role=\"button\">Log Out<a>and I have to specify that it should be navigated to with the POST verb.

I 开发者_开发知识库have a regular link <a href="Auth/LogOut" data-role="button">Log Out<a>and I have to specify that it should be navigated to with the POST verb.

How exactly do I do that?


Docs: jQuery Mobile


// using changePage to use POST on submit
$("#LogOut").bind("submit", function() {
  if (validateFormData()) {
    changePage({
      url: "Auth/LogOut",
      type: "post",
      data: anyDataNeedingPassing
    }, false);
0

精彩评论

暂无评论...
验证码 换一张
取 消