复选框是否被选中


//复选框是否选中
var checkbox = document.getElementById('flag');//
// alert(checkbox.checked);//是否被选中
var startingPrice =     document.getElementById("startingPrice").value;
if(checkbox.checked || startingPrice !=''){//选中了
}else{ //没选中
  alert("请填写免配送费金额");
return false;
}


猜你喜欢

转载自pxy.iteye.com/blog/2327099