For example:
When the browser parses, it first loads the input tag and then the img tag.
At this time, if you want to determine whether the img tag is loaded, you can add a script before and after the img tag, such as
code
Pay attention to the js code before and after the img tag at this time. The above js code first obtains the img object, and then determines whether the object is empty. If it is empty, it means that it has not been loaded. Once completed, the user will be prompted with "Generating Image Control", and the prompt information will be hidden after loading is complete.
The above method applies to all controls or labels, but for controls or labels that have onload events themselves (this event is triggered after the corresponding control or label is loaded), we can completely encapsulate the code behind the img into a The function is called by onload, as follows
Code
As you can see from the above code, the code behind the img tag has been encapsulated into the loadedimg method and is called by img's onload.
So which controls or labels have onload events? I checked it online and found the following (not sure if it is complete):
,
,