site de Fabien Torre


Source de formjs2.html

1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2: <HTML> 3: <HEAD> 4: <TITLE>Deux champs obligatoires</TITLE> 5: <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> 6: <link REL="stylesheet" TYPE="text/css" HREF="https://fabien-torre.fr/include/css/ft-v1.css"> 7: <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> 8: function check() { 9: if (document.F.lenom.value == "") { 10: alert("Nom obligatoire.\n"); 11: document.F.lenom.focus(); 12: return false; 13: } 14: if (document.F.Email.value == "") { 15: alert("Email obligatoire.\n"); 16: document.F.Email.focus(); 17: return false; 18: } 19: return true; 20: } 21: </script> 22: </HEAD> 23: <BODY> 24: 25: <DIV CLASS="menu"> 26: <DIV CLASS="partmenu"> 27: <UL> 28: <LI> voir le <A HREF="https://fabien-torre.fr/Enseignement/tp/JavaScript/formjs2.html.src">code de cette page</A> 29: <LI> retour à la page des 30: <A HREF="https://fabien-torre.fr/Enseignement/tp/JavaScript/">Travaux pratiques JavaScript</A> 31: <LI> retour à la page de <A HREF="https://fabien-torre.fr/">Fabien Torre</A> 32: </UL> 33: </DIV> 34: </DIV> 35: <DIV CLASS="page"> 36: 37: <H1>Deux champs obligatoires</H1> 38: 39: 40: <div class="presentation"> 41: Les champs <em>Nom</em> et <em>email</em> sont obligatoires. 42: </div> 43: 44: 45: <CENTER> 46: 47: <FORM NAME="F" onSubmit="return check()" ACTION="gagne.php" METHOD="post"> 48: <TABLE> 49: <TR><TD>Identifiant</TD><TD><INPUT TYPE="text" NAME="identite"></TD></TR> 50: <TR><TD>Nom<sup>*</sup></TD><TD><INPUT TYPE="text" NAME="lenom"></TD></TR> 51: <TR><TD>Promotion</TD><TD><INPUT TYPE="text" NAME="promotion"></TD></TR> 52: <TR><TD>adresse</TD><TD><INPUT TYPE="text" NAME="adr"></TD></TR> 53: <TR><TD>email<sup>*</sup></TD><TD><INPUT TYPE="text" NAME="Email"></TD></TR> 54: <TR><TD>téléphone</TD><TD><INPUT TYPE="text" NAME="tel"></TD></TR> 55: </TABLE> 56: <INPUT TYPE="submit"> 57: </FORM> 58: 59: </CENTER> 60: 61: <br> 62: <hr> 63: <div class="pied"> 64: &copy; <script type="text/javascript"> 65: <!-- 66: eval(unescape( 67: '%76%61%72%20%65%3d%27%66%61%62%69%65%6e%2e%74%6f%72%72'+ 68: '%65%27%2b%27%40%27%2b%27%75%6e%69%76%2d%6c%69%6c%6c%65'+ 69: '%33%2e%66%72%27%3b%76%61%72%20%74%3d%27%46%61%62%69%65'+ 70: '%6e%20%54%6f%72%72%65%27%3b%64%6f%63%75%6d%65%6e%74%2e'+ 71: '%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61'+ 72: '%69%6c%74%6f%3a%27%2b%65%2b%27%22%3e%27%2b%74%2b%27%3c'+ 73: '%2f%61%3e%27%29')); //--> 74: </script> 75: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 76: <a href="http://validator.w3.org/check/referer"><img src="https://fabien-torre.fr/Images/valid-xhtml10.png" alt="Valid XHTML 1.0!" height="31" width="88" /></a> 77: <a href="http://jigsaw.w3.org/css-validator/validator?uri=https://fabien-torre.fr/include/css/ft-v1.css"><img style="width:88px;height:31px" src="https://fabien-torre.fr/Images/vcss.png" alt="Valid CSS!" /></a> 78: </div> 79: </div> 80: 81: </BODY> 82: </HTML>
Fabien Torre Valid HTML5! Valid CSS!
site de Fabien Torre, université de Lille