Home > Web Front-end > JS Tutorial > js tips--automatically hide the red cross_image special effects

js tips--automatically hide the red cross_image special effects

WBOY
Release: 2016-05-16 19:10:16
Original
1340 people have browsed it

When the linked image in the article fails, you will see an annoying red cross. Although the image has alt attributes that can remedy the meaning of the image, it still gives people an unfriendly feeling.
If you add a judgment to the image, it will not be displayed when loading fails, which can produce a more satisfying user experience.
The code is as follows:
js tips--automatically hide the red cross_image special effects

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