自己写吧
<script>
function CheckForm()
{
for(iIndex=0;iIndex<document.forms[0].elements.length;iIndex++)
{
if(document.forms[0].item(iIndex).tagName=="INPUT")
{
if(document.forms[0].item(iIndex).type=="text")
{
if(document.forms[0].item(iIndex).value=="")
{
return false;
}
}
}
}
return true;
}
</script>
<form>
<input type=text id="T1" value="">
<input type=text id="T2" value="">
<input type=text id="T3" value="">
<br>
<input type=button id="B1" value="效验" onclick="if(!CheckForm()){window.confirm('存在NULL')}">
</form>

解决方案 »

  1.   

    偶知道是干什么功能的,只是对其中的有些语法不太懂,所以找各位大虾解释一下。学习学习高手的程序(不要告诉俺,dw的程序员不是高手。),嘻嘻,比如
    onSubmit="MM_validateForm('c1','','R','c2','','R');return document.MM_returnValue"
    这一段分号后面的返回值起什么作用?
    另附上一个前段程序中调用了的函数,
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }