HTML DOM FileUpload type property
Definition and Usage
FileUpload object type property returns the type of form element.
For FileUpload object, the property returns "file".
grammar
fileuploadObject.type
Browser Support
All major browsers support attribute type
Examples
Examples
Display FileUpload object form element type:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
var x = document.getElementById ( "fname") type.;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form>
Select a file to upload:
<Input type = "file" id = "fname">
</ Form>
<Button type = "button" onclick = "displayResult ()"> Display input type </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
var x = document.getElementById ( "fname") type.;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form>
Select a file to upload:
<Input type = "file" id = "fname">
</ Form>
<Button type = "button" onclick = "displayResult ()"> Display input type </ button>
</ Body>
</ Html>
try it"
Fileupload objects