HTML DOM propriété type de réinitialisation
Définition et utilisation
Type propriété renvoie le bouton de réinitialisation type d'élément de formulaire.
Pour le bouton de confirmation, cet attribut est toujours "reset".
grammaire
resetObject.type
support du navigateur
Tous les principaux navigateurs supportent type d'attribut
Exemples
Exemples
L'exemple suivant retourne le type reset bouton élément de formulaire:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Titre> Ce tutoriel (w3big.com) </ title>
<Script>
fonction displayResult () {
var x = document.getElementById ( "CONFIG.1") type .;
alerte (x);
}
</ Script>
</ Head>
<Body>
<Form>
Email: <input type = "text" id = "email">
<Input type = "reset" id = "CONFIG.1">
</ Form>
<Bouton type = "button" onclick = "displayResult ()"> input type d'affichage </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Titre> Ce tutoriel (w3big.com) </ title>
<Script>
fonction displayResult () {
var x = document.getElementById ( "CONFIG.1") type .;
alerte (x);
}
</ Script>
</ Head>
<Body>
<Form>
Email: <input type = "text" id = "email">
<Input type = "reset" id = "CONFIG.1">
</ Form>
<Bouton type = "button" onclick = "displayResult ()"> input type d'affichage </ button>
</ Body>
</ Html>
Essayez »
Réinitialiser les objets