【发布时间】:2016-08-24 23:14:18
【问题描述】:
验证在除 Safari 之外的所有浏览器中都能正常工作。
它包括 3 个部分(a、b、c)。在 safari A 和 c 部分工作完美。但是当我点击 B 部分时,它会显示警报“输入图像数量”。我的结果是alert('Enter total no. of images');。
function validate()
{
if(document.commentform2.rb.value=='wed_custom')
{
if(document.commentform2.cull_onoffswitch.checked===true)
{
if(document.commentform2.cull_images.value=='')
{
alert('Enter Cull total images');
document.commentform2.cull_images.focus();
return false;
}
if(document.commentform2.cull_max.value=='')
{
alert('Enter Maximum no. of images');
document.commentform2.cull_max.focus();
return false;
}
}
else if(document.commentform2.str_onoffswitch.checked===false)
{
if(document.commentform2.total_images_lr.value=='')
{
alert('Enter total no. of images');
document.commentform2.total_images_lr.focus();
return false;
}
}
}
else {
if(document.commentform2.no_images.value=='')
{
alert('Enter Number of images');
document.commentform2.no_images.focus();
return false;
}
}
return true;
}
【问题讨论】:
标签: javascript safari