且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

即与ajax html响应问题

更新时间:2022-06-05 09:10:51

您正在告诉它单击提交"按钮时运行JS……不是.

You are telling it to run the JS when the submit button is being clicked … which it isn't.

$(".toggle-form-submit").live('click',

应该是:

$("form").live('submit',

…,但是请确保当JS不运行时,结果仍然有意义.您不能保证用户(或他们的sysad,连接不良或其他原因)不会阻止JS.

… but make sure that when the JS doesn't run, the result stills makes sense. You can't guarantee that the user (or their sysad, or a bad connection, or something else) won't block the JS.