password
特性为
URL
接口是
USVString
containing the password specified before the domain name.
If it is set without first setting the
username
property, it silently fails.
const passwordString = url.password url.password = newPassword
A
USVString
.
const url = new URL('https://anonymous:flabada@developer.mozilla.org/en-US/docs/Web/API/URL/password');
console.log(url.password) // Logs "flabada"
| 规范 | 状态 | 注释 |
|---|---|---|
|
URL
The definition of 'URL.password' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
password
|
Chrome 32 | Edge 12 | Firefox 26 | IE No | Opera Yes | Safari 10 | WebView Android ≤37 | Chrome Android 32 | Firefox Android 26 | Opera Android Yes | Safari iOS Yes | Samsung Internet Android 6.0 |
完整支持
不支持
URL
interface it belongs to.