我认为没有,但这不会在facebox中加载:
$("#email").submit(function(event) {
event.preventDefault();
if ($("#tinput").val() == "") {
$('#error').append('You need to select a template.<br />');
} else if ($("#tsubject").val() == ""){
$('#error').append('Subject cannot be blank.<br />');
} else if ($("#tmessage").val() == "") {
$('#error').append('Message cannot be blank.<br />');
} else {
$('#ecanvas').html('<center><img src="/templates/v2/images/loading.gif" /></center>');
var formdata = $(this).serialize();
$.post("/wizard/email-add", formdata, function (data) {
$('#ecanvas').html(data);
});
return false;
})
这没有任何问题:
$("#email").submit(function(event) {
event.preventDefault();
$('#ecanvas').html('<center><img src="/templates/v2/images/loading.gif" /></center>');
var formdata = $(this).serialize();
$.post("/wizard/email-add", formdata, function (data) {
$('#ecanvas').html(data);
});
return false;
})
我应该提到#ecanvas,#error,#tinput,#tsubject和#tmessage都存在。
答案 0 :(得分:5)
您未能关闭else