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

Implementation code for JS file size judgment_image special effects

WBOY
Release: 2016-05-16 18:30:18
Original
929 people have browsed it
Method one, use ActiveX control to implement:
Copy the code The code is as follows:






This method can be used in IE. If there are any shortcomings, there will be a security prompt. Changing the name to .hta will block the security prompts.
Method 2, use the dynsrc attribute of img:
Copy the code The code is as follows:






This method can be used in IE6, but cannot be used in IE7, IE8, Firefox, and chrome.
Method three, use the fileSize of img:
Copy the code The code is as follows:




< ;legend>Image source
LocalRemote:

Preview area





It can be used in IE, FireFox, and chrome, but it only determines the size of the image file.
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