Lezione 2: CGI

Form

Elemento INPUT

È l'elemento più ricco di funzionalità:

<input name="nome del campo"
    type="[text | password | checkbox | radio | hidden | submit | reset]"
    value="valore iniziale"
    size="dimensione"
    maxlength="numero massimo di caratteri"
    [checked] [readonly] ...>

Attributo type Resa del browser Codice HTML
text <input name="testo" type="text" value="testo iniziale" size="15">
password <input name="passwd" type="password" value="1g%34D9$" size="15" maxlength="10">
checkbox A B A<input name="scelta1" type="checkbox" value="A"> B<input name="scelta2" type="checkbox" value="B" checked>
radio A B A<input name="opzione_esclusiva" type="radio" value="A" checked> B<input name="opzione_esclusiva" type="radio" value="B">
hidden   <input name="variabile_nascosta" type="hidden" value="1234">
submit <input type="submit">
reset <input type="reset" value="Annulla">

Valida il documento
Copyright © 2002 by Roberto Posenato