Latest web development tutorials

HTML DOM FileUpload type property

Fileupload Object Reference Fileupload objects

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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>

try it"


Fileupload Object Reference Fileupload objects