Img images cannot be displayed. The onerror event is used to display the replacement image, imgonerror
Definition and usage of URL attributes:
This attribute returns the URL of the current document.
Description: The value of this attribute corresponds to the location of the Window containing the document. href attributes are the same, but when URL redirection occurs, this URL attribute stores the actual URL of the document, while location. href saves the request URL.
Syntax structure:
Document. URL
Browser support:
1. Internet Explorer supports this attribute.
2. Firefox supports this attribute.
3. operabrowser supports this attribute.
4. Google Chrome supports this attribute.
Instance code:
<! DOCTYPE html>
The above code can output the URL of the current document.
The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 6865.
For more information, see: http://www.softwhy.com/javascript/