开发者

How to add ajaxoptions to form

开发者 https://www.devze.com 2022-12-29 14:33 出处:网络
How can I have ajaxoptions included in the following form: <form id=\"\" action=\"<%=Url.Action(\"ChangePassword\",new{Action=\"ChangePassword\" }) %>\" method=\"开发者_如何学Cpost\" enctype

How can I have ajaxoptions included in the following form:

   <form id="" action="<%=Url.Action("ChangePassword",new{Action="ChangePassword" }) %>" method="开发者_如何学Cpost" enctype="multipart/form-data">


What javascript (if any) library are you using?

Generally you set the options in script and not C# code.

To answer your comment:

In JQuery w/ Form Plugin like:

var options = { 
       target: '#output2' // target element(s) to be updated with server response 
}

$(function() {
   $("form").submit(function() { 

        $(this).ajaxSubmit(options); 

        return false; 
   });
});
0

精彩评论

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

关注公众号