Home >Web Front-end >JS Tutorial >Preview the js code of local images on the client side on the page (compatible with FF IE)_Image special effects

Preview the js code of local images on the client side on the page (compatible with FF IE)_Image special effects

WBOY
WBOYOriginal
2016-05-16 17:53:28921browse

The company recently had a project with such a need, and I discovered that the method used in the article I wrote before about how to get the user's local image path through JS only supports local page preview of local images
One solution is to upload to the server Then return the relative path, but efficiency is a problem, and the programming complexity will also increase
Directly upload the demo code to provide source code for more colleagues who have this need and are struggling to find a solution. Please indicate the source. I have more here. There are many solutions to other problems for more people to refer to

Statement:
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