폼(Form)
[List][Prev][Next]
폼에 지정된 변수의 이름을 알필요없이 모든 값이 입력되었는지를 체크하는 방법 [ Preview ]

<HEAD>

<BODY BGCOLOR=FFFFFF>
<SCRIPT>
function testform(){
if(document.forms[0].elements[0].value==""
|| document.forms[0].elements[1].value==""
|| document.forms[0].elements[2].value==""
|| document.forms[0].elements[3].value==""
|| document.forms[0].elements[4].value==""
|| document.forms[0].elements[5].value=="") {
alert("You must fill in all the information in this form")
}
}
</SCRIPT>
<CENTER>
<H1> Test completeness of form before submitting</H1>
<P>
<H2>Please enter your personal data here:</H2>
<P>
<FORM method=post onSubmit="return testform()">
<TABLE>
<TR>
<TD>Name:</TD>
<TD><INPUT type="text" name="name" size=35></TD>
</TR>
<TR>
<TD>Address:</TD>
<TD><INPUT type="text" name="address" size=35></TD>
</TR>
<TR>
<TD>City:</TD>
<TD><INPUT type="text" name="city" size=35></TD>
</TR>
<TR>
<TD>State:</TD>
<TD><INPUT type="text" name="state" size=17 >
Zip: <INPUT type="text" name="zip" size=12></TD>
</TR>
<TR>
<TD>Phone #:</TD>
<TD><INPUT type="text" name="phone" size=35</TD>
</TR>
</TABLE>
<INPUT type="submit" name="submit button" value="submit" >
</FORM>
</CENTER>
</BODY>

<%//# DataBinder.Eval(Container.DataItem, "album_title") %>
<%//# DataBinder.Eval(Container.DataItem, "contenttype") + " views" %>
link list for hairwigbeautyshop.com ::
Javascript Source List :