来源:网络 | 2007-5-25 | (有3005人读过)
function CheckFormValue(ElementList){ var ReturnValue; ReturnValue = 1; if(ElementList.length > 0){ var MyString, MyArray; MyString = ElementList; MyArray = MyString.split(’,’); for (i = 0; i < MyArray.length; i++){ if(window.document.forms.length > 0){ for (j = 0; j < window.document.forms.length; j++) { for(n=0; n < window.document.forms[j].elements.length; n++){ if(window.document.forms[j].elements[n].name == MyArray[i] && window.document.forms[j].elements[n].value == ’’){ ReturnValue = 0; break; } } } } } } if(ReturnValue == 0){ alert(’数据填写不全!"); return false; } else{ document.forms[0].submit(); return true; } }
|