我有一个对话框需要在用户单击提交时显示。然后,用户必须要么接受我们资源的使用条款。
<script>
$(document).ready(function() {
$(function() {
var Form;
$("#confirm").dialog({
height: 200,
width: 200,
modal: true,
buttons: {
'No': function() { // No works (since I only need to close the box)
$(this).dialog("close");
},
'Yes': function() { // This is not working. The button just keeps me on the same page with no submission
Form.submit();
}
}
});
});
$("#acceptform").submit(function() { // This is the form that a user has to submit before the dialog box appears
Form = this;
$('#confirm').dialog('open');
return false;
});
});
</script>
如果有任何其他事情需要更好地问这个问题,请告诉我。