开发者

ajaxSubmit enables disabled fields

开发者 https://www.devze.com 2022-12-21 00:23 出处:网络
I have some disabled=truefields, but then I submit a form using ajaxSubmit(), all disabled fields become enabled开发者_StackOverflow社区. What I have to do to keep fields disabled?You can do that with

I have some disabled=true fields, but then I submit a form using ajaxSubmit(), all disabled fields become enabled开发者_StackOverflow社区. What I have to do to keep fields disabled?


You can do that within the success callback option, e.g.:

var options = {
    url:         '/some/url',
    type:        'post',
    target:       '#resultsDiv',
    success:       function() { $("#foo").attr("disabled","disabled");  }
};
0

精彩评论

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