username
特性为
URL
接口是
USVString
containing the username specified before the domain name.
const usernameString = url.username url.username = newUsername
A
USVString
.
const url = new URL('https://anonymous:flabada@developer.mozilla.org/en-US/docs/Web/API/URL/username');
console.log(url.username) // Logs "anonymous"
| 规范 | 状态 | 注释 |
|---|---|---|
|
URL
The definition of 'username' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
username
|
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.