Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 17:13:37
Original
1326 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:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template