$(document).on('click','#submit_title_btn',function(){var title = $("#title").val();if (!title) { // 添加dealText('#title','请输入题目内容');return false;}//上锁if (!lock_flag) {lock_flag = true;$("#form_title").ajaxSubmit({// 直接触发 $("#from_title").ajaxSubmit(); 再封装$("#from_title").ajaxSubmit({........}); 事件不可回调;dataType: "json",success : function(obj){lock_flag = false;if(obj.errno == 0){lock_flag = false;layer.msg(obj.errdesc);setTimeout(function() {window.location.reload();},2000);} else {lock_flag = false;layer.msg(obj.errdesc);}return false;},error: function(){layer.msg('网络错误');lock_flag = false;return false;}});return false;}lock_flag = false;});
1200字范文,内容丰富有趣,写作的好帮手!