我需要帮助为我正在验证的对象创建一个 javascript 循环。验证有效,它显示警报,但它不关注该字段。它不会关注该字段的原因是因为每次用户添加另一个帐户时,该字段的 id 都是唯一的。代码如下:
if ((theForm.LinkedAccts.value == "Yes")&&
(document.getElementById('DLAccount').selectedIndex == ""))
{
alert("Please enter the Delink Account number.");
document.getElementById('DLAccount').focus();
return (false);
}
谢谢!