Esempi Form in HTML5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
<!doctype html> <html lang="it"> <head> <title>VARI FORM / MODULI COMPILABILI</title> </head> <body> <h2>FORM 0</h2> <form name="form0"> <p>L'asterisco (*) indica i campi obbligatori</p> Nome(*): <input type="text" id="nome" name="nome" required autofocus="autofocus" maxlength="60" size="40" /><br /> Cognome(*): <input type="text" id="cognome" name="cognome" required maxlength="60" size="40" /><br /> Telefono: <input type="tel" id="telefono" name="telefono" /><br /> Email(*): <input type="email" id="email" name="email" placeholder="nome@dominio.it" required /><br /> Sito Personale: <input type="url" id="sito" name="sito" placeholder="www.sito.com" /><br /> Numero Figli: <input type="number" name="n_figli" id="n_figli" min="0" max="10"> Commenti: <textarea id="commenti" name="commenti" maxlength="100"></textarea><br /> <input type="submit" value="Registrati"><br /> <button id="registrati" name="registrati">Registrati</button><br /> </form> <h2>FORM 1 - QUESTIONARIO</h2> <form name="form1" action="pagRisposta.php" method="post" style="border:0px"> Nome: <input type="text" name="tuoNome" value="inserisci il tuo nome" required maxlength="60" size="40" tabindex="1" /><br /> Cognome: <input type="text" /><br /> User: <input type="text" /><br /> Password: <input type="password" maxlength="8" size="18" /><br /> <p>Che veicolo possiedi?</p> <input type="radio" name="Veicolo" value="auto" alt="auto" />Auto<br /> <input type="radio" name="Veicolo" value="moto" alt="moto" />Moto<br /> <p>Sei maggiorenne?</p> <input type="radio" name="Maggiorenne" value="si" alt="si" />Si<br /> <input type="radio" name="Maggiorenne" value="no" alt="no" />No<br /> <p>Quali linguaggi conosci?</p> <input type="radio" name="linguaggi" value="HTML" alt="HTML" checked="checked" />HTML<br /> <input type="radio" name="linguaggi" value="CSS" alt="CSS" disabled="disabled" />CSS<br /> <input type="radio" name="linguaggi" value="JS" alt="JS" />JS<br /> <p> Come sei venuto a conoscenza di questo sito?</p> <input type="checkbox" name="Web" value="web" checked />Web<br /> <input type="checkbox" name="Amico" value="amico" />Amico<br /> <input type="checkbox" name="Rivista" value="rivista" />Rivista<br /> <input type="checkbox" name="Scuola" value="scuola" disabled="disabled" checked />Scuola<br /> <input readonly="readonly" maxlength="8" size="20" value="leggi e impara" name="mioTesto" /><br /> <input disabled="disabled" maxlength="8" size="20" value="leggi e impara" name="mioTesto" /><br /> <textarea name="areaTesto" rows="5" cols="40">ins annotazioni</textarea><br /> <select name="link"> <option value="http://www.atosi.it" selected="selected">www.atosi.it</option> <option value="http://www.liceotosi.va.it" selected="selected">www.liceotosi.va.it</option> <option value="https://www.ingdanielecorti.it" selected="selected">www.ingdanielecorti.it</option> </select> <select name="siti"> <optgroup label="siti per Webmaster"> <option value="http://www.html.it">HTML.it</option> <option value="http://www.html.it/javascript">JavaScript HTML.it</option> <option value="http://www.html.it/css">CSS HTML.it</option> </optgroup> <optgroup label="risorse per Webmaster"> <option value="http://font.html.it">font.html.it</option> <option value="http://cgipoint.html.it">cgipoint.html.it</option> </optgroup> </select> <label>Quale siti visiti?<br> <select name="siti" multiple="multiple" size="5"> <option value="http://www.html.it">www.html.it </option> <option value="http://freephp.html.it">frephp.html.it </option> <option value="http://freasp.html.it">freasp.html.it </option> <option value="http://font.html.it">font.html.it </option> <option value="http://cgipoint.html.it" >cgipoint.html.it </option> </select> </label> <select name="link"> <option value="http://www.atosi.it" selected="selected">www.atosi.it</option> <option value="http://www.liceotosi.va.it" selected="selected">www.liceotosi.va.it</option> <option value="https://www.ingdanielecorti.it" selected="selected">www.ingdanielecorti.it</option> </select> <br /> Email: <input type="email" form="contact_form" name="email" placeholder="riccardobra@gmail.com"> <form id="contact_form"></form> <br /> <input type="hidden" name="passoDatiNascosti" value="password=123456"> <br /><input type="submit" value="Invio dati"><br /> <input type="submit" value="Invio dati disabilitato" disabled><br /> <input type="reset" value="cancella dati"><br /> <button type="submit" value="Invio dati"> Invia <img src="invio.jpg" width="67" height="67" title="invia ora" border="1" vspace="4" alt="invia ora" align="middle"> <b>Invia Ora</b> </button><br /> <button type="reset" value="cancella">Cancella</button><br /> <button type="button" value="bottone generico abbinato a JS">Bottone generico</button> </form> <h2>FORM 2 - DATI ANAGRAFICI</h2> <form name="form2"> <fieldset> <legend>Datianagrafici</legend> <label>Anno di nascita: <input type="text"></label> <label>Nome: <input type="text"></label> <label>Cognome: <input type="text"></label> </fieldset> </form> <h2>FORM 3 - INVIO VIA EMAIL</h2> <form name="form3" action="mailto:tuamail@nomeDominio.it?subject=Oggetto predefinito" enctype="text/plain" method="POST"> ciao </form> <h2>FORM 4 - INVIO IMMAGINE</h2> <form name="form4"> <input name="Invio dati" type="image" src="invio2.jpg" alt="invia il modulo" title="invia il modulo" width="78" height="38"> </form> <h2>FORM 5 - INVIO FILE</h2> <form name="form5" action="post"> <input name="fileUtente" type="file" size="20" /> </form> <h2>FORM 6 - FORM CON FIELDSET</h2> <form name="datiUtente" enctype="text/plain" method="post" action="mailto:tuamail@nomeDominio.it?subject=Questionario proveniente dal web"> <fieldset> <legend>Dati Utente</legend> <label>Nome: <input name="nome" type="text" size="20" maxlength="30"/></label> <label>Cognome: <input name="cognome" type="text" size="20" maxlength="30"/></label> <label>Professione: <input name="cognome" type="text" size="20" maxlength="30"/> </label> </fieldset> <br/> <fieldset> <legend>Questionario</legend> <label>Siti visitati:<br/> <select name="siti" size="5" multiple="multiple"> <option value="http://www.html.it">www.html.it</option> <option value="http://freephp.html.it">frephp.html.it</option> <option value="http://freasp.html.it">freasp.html.it</option> <option value="http://font.html.it">font.html.it</option> <option value="http://cgipoint.html.it" >cgipoint.html.it</option> </select> </label> </fieldset> <br/> <fieldset> <legend>Campo libero</legend> <label>Lasciami un parere:<br/> <textarea name="parere" cols="20" rows="10"> </textarea> </label> </fieldset> <br/> <button type="reset">annulla</button> <button type="submit">invia</button> </form> <h2>FORM 7 - REGISTRAZIONE</h2> <form action="elaboraForm.php" method="post" name="Form5_Registrazione"> <strong>Nome:</strong><br /> <input type="text" name="nome" /><br /> <strong>Cognome:</strong><br /> <input type="text" name="cognome" /><br /> <strong>Email:</strong><br /> <input type="text" name="email" /><br /> <strong>Username:</strong><br /> <input type="text" name="username" /><br /> <strong>Password:</strong><br /> <input type="password" name="password" /><br /><br /> <strong>Utente</strong><br /> <input type="radio" name="utente" value="alunno" />Alunno<br /> <input type="radio" name="utente" value="docente" />Docente<br /><br /> <strong>Come sei venuto a conoscenza di questo sito?</p> <input type="checkbox" name="vetConoscenze[]" value="web" checked="checked" />Web<br /> <input type="checkbox" name="vetConoscenze[]" value="amico" />Amico<br /> <input type="checkbox" name="vetConoscenze[]" value="rivista" />Rivista<br /><br /><br /> <strong>Commento</strong><br /> <textarea rows="4" cols="50" name="commento"> Lascia un commento </textarea> <br /><br /> Prov<br /> <select name="prov"> <option value="BS">BS</option> <option value="MI">MI</option> <option value="VA">VA</option> </select> <br /><br /> Prov<br /> <input list="prov" name="prov"> <datalist id="prov"> <option value="BS">BS</option> <option value="MI">MI</option> <option value="VA">VA</option> </datalist> <br /><br /> <label for="donation">Donation Amount (USD):</label> <input type="range" name="donation" id="donation" list="donation_list" step="5" min="5" max="200"> <datalist id="donation_list"> <option>25</option> <option>50</option> <option>100</option> <option>200</option> </datalist> <br /><br /> <label for="country">Country:</label> <datalist id="country_list"> <select name="country"> <option value="AF">Afghanistan</option> <option value="AX">Åland Islands</option> <option value="AL">Albania</option> <option value="DZ">Algeria</option> <option value="AS">American Samoa</option> <!-- more --> </select> If other, please specify: </datalist> <input type="text" name=”country” id=”country” list="country_list"> <br /><br /> <strong>Numeri da inviare:</strong><br /> <input type="text" name="numeri" /><br /> <br /><br /> <input type="submit" value="Registrati" /> <input type="reset" value="Annulla" /> </form> </body> </html> |