【发布时间】:2010-07-12 01:53:10
【问题描述】:
嗨,我有以下功能,只有在检查另外两个复选框中时,才需要使其返回false。
$.validator.addMethod(
"ReutersNA",
function(value, element) {
var selectedCountry = $("#Country").val();
var NorthAmerica = new Array("USA","CAN","MEX");
if($.inArray(selectedCountry,NorthAmerica) > -1) {
return true;
} else return false;
}, "Cannot select Reuters News outside of North America."
);
I need to add if($("#IQBAS, #IQPRE").is(":checked") && the above function = return true
【问题讨论】:
标签: javascript jquery arrays