What should I do if IMG does not support onload labels? _ JavaScript

Source: Internet
Author: User
Webpage standards. IMG does not support onload labels. what should I do? webpage standards? IMG does not support onload labels. what should I do? I remember someone asked me before, but I didn't pay attention to this yet. now we finally have this problem. because the img tag does not have an onload event. therefore, the onload used by img in UBB code is used to handle large images for self-adaptation. this method cannot be used.
However, after testing, the body can still carry the onload event, so the solution is to process too large images after all the pages are loaded.

So I wrote a simple piece of code using JS.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.