Password atriplayo ng Anchor
Paglilinaw at paggamit
password
Iseto o ibilhan ang atriplayo Halaga ng href atriplayo ng porsyong password.
Sa URL, ang porsyong password ay ang sinisikapang ilagay ng user. Ito ay nakatalaga sa likod ng pangngalan at bago ang pangalan ng host.
Halimbawa: https://billgates:bill234@www.example.com(billgates ay ang pangngalan, bill234 ay ang password)。
Mga paalala:Gamitin ang username atriplayo Iseto o ibilhan Halaga ng href atriplayo ng bahaging pangngalan.
Egemplo
Halimbawa 1
Bilhanap ang porsyong password ng link:
var x = document.getElementById("myAnchor").password;
Halimbawa 2
Ayusin ang porsyong password ng link:
document.getElementById("myAnchor").password = "newPassword101";
Gramata
Bilhanap ang password atriplayo:
anchorObject.password
Set password attribute:
anchorObject.password = password
Attribute Value
Value | Description |
---|---|
password | Specifies the password part of the URL. |
Technical Details
Return Value: | 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 |