Home > Web Front-end > JS Tutorial > Client js determines the file type and file size and limits the upload size_javascript skills

Client js determines the file type and file size and limits the upload size_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 17:13:37
Original
1390 people have browsed it

Due to project needs! A script is needed to determine the size and file type on the client side! It’s so hard to find information online! I simply wrote an example myself and tested the file upload size limit. It is compatible with ie6, ie7, ie8, Google Chrome, ff and other browsers

Copy code The code is as follows:







< input type="file" name="contractFileName" style="width: 500px;" onchange="fileChange(this);"/>


Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
How to use useState in the tab page in antd react
From 1970-01-01 08:00:00
0
0
0
I failed to follow the teacher’s instructions
From 1970-01-01 08:00:00
0
0
0
PHP path reference settings
From 1970-01-01 08:00:00
0
0
0
Convert html files to word
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template