How to solve js problems-php Tutorial

Source: Internet
Author: User
The code in html is as follows:



How does js achieve the following results?
When the page is opened, preload the image first. when the image is loaded, the id is the load display code.

Loading


After the image is loaded,

Loading

Remove.
What is the overall js code like this ??


Reply to discussion (solution)

Is jquery used by the landlord?
If you use this method, you can meet your needs:
/// The Display code whose id is load when the image is being loaded

Loading


$ (Document). ready (function (){
// After the image is loaded,

Loading

Remove.
});

Is jquery used by the landlord?
If you use this method, you can meet your needs:
/// The Display code whose id is load when the image is being loaded

Loading


$ (Document). ready (function (){
// After the image is loaded,

Loading

Remove.
});
How can I determine whether the image has been loaded?

When the image is loaded, the img onload event is triggered.

When the image is loaded, the img onload event is triggered.
Is there complete code?

Onlookers



Validate empty fields

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.