jquery 中的 return false 不起作用
1 $(".lcId").each(function(e) { 2 if ($(this).attr("checked") == "checked") { 3 if($(this).attr("name")==24){ 4 ids.push($(this).val() + ''); 5 }else{ 6 alert("请选择待处理订单"); 7 e.preventDefault();
return false ; //不起作用 8 } 9 } 10 });
将 return false , 更改为 e.preventDefault(); 在e 该 function 中的参数
原文 来自 http://www.berlinix.com/js/jquery-return-false.php