FileUpload.type

JavaScript 1.1+ Nav3+, Opera3+ Syntax

							fileupload.type

Description

The type property of the FileUpload object represents the TYPE attribute of the HTML <input> tag used to create the upload box.

Example

Listing 7.251 shows how to access the type property. When the user clicks the Get Type button, an alert box appears indicating the type of input.

Listing 7.251 Accessing the FileUpload Type Property
 <html> <head> <title>Using the type property of the FileUpload object</title> </head> <body> <script language="JavaScript"> <!-- Hide // function informs the user what type of input the first element is. function getType(){ var mytype = document.form1.uploadbox.type; alert("The input box type is: " + mytype); } // End Hide ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.