e = document.form1.elements
for(i = 0;i<e.length;i++)
{
 if(e[i].value=="") alert("错误")
}另外,不推荐使用数字做id或者name