Window location.protocol 属性
- Forrige side port
- Næste side reload()
- Gå tilbage til niveauet over Window Location
定义和用法
protocol
属性设置或返回当前 URL 的协议,包括冒号 (:)。
该协议是一种标准,用于指定数据在计算机之间的传输方式。
语法
返回 protocol 属性:
location.protocol
设置 protocol 属性:
location.protocol = protocol
属性值
值 | 描述 |
---|---|
protocol | URL 的协议。例如: |
返回值
类型 | 描述 |
---|---|
Protokollen for den aktuelle URL, herunder kolon ( |
Browserunderstøttelse
Alle browsere understøtter location.protocol:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Forrige side port
- Næste side reload()
- Gå tilbage til niveauet over Window Location