0
我写了下面的javascript代码,现在我想添加另一个条件/更改不接受零的现有条件。在下面的代码中添加另一个条件,不接受'0'
if (!onlyNumbers($(".vo_head_spots_available:eq(" + i + ")").val())&& $(".vo_head_spots_available:eq(" + i + ")").val().toUpperCase()!="U")
{
$('#msg_f').html('Please enter the # spots available for your Participants. If unlimited, enter U.').show();
$(".vo_head_spots_available:eq(" + i + ")").css('background-color', '#fdd');
isValid = false;
}
else
{
$(".vo_head_spots_available:eq(" + i + ")").val($(".vo_head_spots_available:eq(" + i + ")").val().toUpperCase());
$('#msg_f').html('').hide();
$(".vo_head_spots_available:eq(" + i + ")").css('background', '');
}
我们怎样才能帮你?改变什么条件?你需要更具体些。 – Blender 2012-08-12 06:09:00