FileUpload

The FileUpload form element lets a visitor choose a file on the computer to submit to a CGI script along with the form. Use the syntax <input type = "file">.

Properties

name

FF, IE 3

Name of the FileUpload field

value

FF, IE 4

Read-only: Filename selected

Methods

blur()

FF, IE 3

Removes the cursor from the FileUpload element

focus()

FF, IE 3

Moves the cursor to the FileUpload element

select()

FF, IE 3

Selects the text inside the FileUpload element

Handlers

onBlur

FF, IE 3

Called when the user removes the cursor from the field

onChange

FF, IE 3

Triggered when a visitor changes the contents of the field

onFocus

FF, IE 3

Called when the user puts the cursor into the field

Get The Book of JavaScript, 2nd Edition 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.