开发者

How to add ajaxoptions to form

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜