2009-11-11 28 views

回答

1

您不需要注销您的事件处理程序;当你火编程的情况下,他们将不会被调用......

document.forms[0].onsubmit = function() { 
    alert("You will not see this"); 
    return false; 
} 
document.forms[0].submit(); 

但是,如果你有一个jQuery对象,一定要调用提交底层DOM元素的功能...

$("form")[0].submit();