Area password attribute
Definition and usage
password
Attribute set or return href attribute value password part.
href
The attribute specifies the destination of the link in the specified area.
In the URL, the password part is the password entered by the user. It is specified between the username and the hostname.
For example: https://billgates:bill234@www.example.com (billgates is the username, bill234 is the password).
Tip:Please use username attribute Set or return href attribute value Username part.
Example
Example 1
Return the password part of the URL of the specific area in the image map:
var x = document.getElementById("venus").password;
Example 2
Change the password part of the specific area in the image map:
document.getElementById("venus").password = "newPassword101";
Syntax
Return the password attribute:
areaObject.password
Set the password attribute:
areaObject.password = password
Attribute Value
Value | Description |
---|---|
password | Specifies the password part of the URL. |
Technical Details
Return Value: | A string value representing the password part of the URL. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supported | Not Supported | Supported | Not Supported | Supported |