Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM FileUpload accept property

FileUpload accept property

Fileupload Object Reference Fileupload object


Definition and Usage

The accept property can set or return the comma-separated content types.

Syntax

Set the accept property:

fileuploadObject.accept="

content-type,content-type,...

"

Return the accept property:

fileuploadObject.accept


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the accept property! But only Firefox, Opera, and Chrome browsers return the file type.


Example

Example

Display The content types the element can accept:

Select a file to upload:

Try it »


Fileupload Object Reference Fileupload object