我有一个JavaScript验证(检查)功能和JavaScript验证后的表单,我需要做一个JQuery的弹出窗口进行确认。有人可以帮助我的条件,以检查如果JavaScript验证是完整的和有效的,然后弹出屏幕?jquery:javascript验证后弹出窗口
$(document).ready(function(){
$('#dialog').dialog ({
autoOpen: false,
width: 400,
modal: true,
resizable: false,
buttons: {
"Print Request Letter": function() {
document.LetterRequest.submit();
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$("#LetterRequest").submit(function(e){
if (!CheckVals() return false) {
e.preventDefault();
$("#dialog-confirm").html($('.NoOfLetters').val());
$('#dialog').dialog('open');
}
});
});
你说的意思是'如果( !CheckVals()返回false){'?这没有意义。 – undefined
考虑添加更多信息,以便我们知道什么是错的。 – bldoron