JavaScript 参考手册
Location protocol 属性
返回当前URL的协议部分
源代码:
点击运行 »
<script> document.write(location.protocol); </script>
1
<
script
>
2
document
.
write
(
location
.
protocol
);
3
</
script
>
运行结果:
点击运行 »