不会吧, 这个问题竟然搁在论坛里半个小时没有理? 算了, 我还是答答吧:for(var i=1; i<4; i++)
{
    if(eval("document.formName.usrdescrip"+ i).value == "")
      //................
}

解决方案 »

  1.   

    ONE:<form id='form1'>
    <input name='a' type='text'><input name='b' type='text'><input name='c' type='text'><input name='d' type='text'>
    <input type='button' onclick='for(i in form1.all.tags("INPUT")){if(form1.all.tags("INPUT")[i].type=="text")alert(form1.all.tags("INPUT")[i].value)}'>
    </form>TWO:<form id='form1'>
    <input name='a' type='text'><input name='b' type='text'><input name='c' type='text'><input name='d' type='text'>
    <input type='button' onclick='for(i=0;i<form1.all.tags("INPUT").length;i++){if(form1.all.tags("INPUT")[i].type=="text")alert(form1.all.tags("INPUT")[i].value)}'>
    </form>