//验证信息是否为空
function ISEmpty()
{
for(i=0;document.getElementById("GV_Price").rows.length-1;i++)
{
var TextBox=document.getElementById(document.getElementById("GV_Price").rows[i].cells[13].firstChild.id);
if(Trim(TextBox.value)=="")
{
alert(i+"价格不能为空");
form1.document.getElementById(document.getElementById("GV_Price").rows[i].cells[13].firstChild.id).focus();
return false;
}
}
return;
}
其中GV_Price是GVid名称。
var PID = document.getElementById("GV_Price").rows[i].cells[0].innerHTML;
取某一列的值

本文介绍了一个JavaScript函数,用于检查HTML表格中所有价格单元格是否为空或未填写,如果发现空的价格项,则会提示错误并使相应的输入框获得焦点。
3861

被折叠的 条评论
为什么被折叠?



