如何使用JavaScript返回网页的协议(http或https)?
使用window.location对象返回协议。该窗口。升ocation.protocoL将返回网络协议,即无论是HTTP 或HTTPS-
示例
<!DOCTYPE html>
<html>
<body>
<script>
document.write("https or https: <br>The protocol is:"+window.location.protocol);
</script>
</body>
</html>热门推荐
10 师生聚餐的祝福语简短
11 离别简短的祝福语大全
12 简短祝福语大全暖心
13 儿女的生日祝福语简短
14 周末思念祝福语大全简短
15 特别的端午祝福语简短
16 新婚过年祝福语大全简短
17 中秋送健康祝福语简短
18 高考送考祝福语简短