HTML DOM FileUpload propriété type
Définition et utilisation
Fileupload propriété type d'objet renvoie le type d'élément de formulaire.
Pour objet FileUpload, la propriété renvoie "fichier".
grammaire
fileuploadObject.type
support du navigateur
Tous les principaux navigateurs supportent type d'attribut
Exemples
Exemples
Afficher FileUpload type d'objet d'é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 ( "fname") type .;
alerte (x);
}
</ Script>
</ Head>
<Body>
<Form>
Sélectionnez un fichier à télécharger:
<Input type = "file" id = "fname">
</ 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 ( "fname") type .;
alerte (x);
}
</ Script>
</ Head>
<Body>
<Form>
Sélectionnez un fichier à télécharger:
<Input type = "file" id = "fname">
</ Form>
<Bouton type = "button" onclick = "displayResult ()"> input type d'affichage </ button>
</ Body>
</ Html>
Essayez »
objets fileupload