URL.protocol
语法
string = object.protocol; object.protocol = string;
参数
A USVString
.
示例
var url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol');
var result = url.protocol; // Returns:"https:"
规范
Specification |
---|
URL Standard # dom-url-protocol |
浏览器兼容性
BCD tables only load in the browser
其他链接
- The
URL
interface it belongs to.