首页天道酬勤JavaScript实现强制重定向至HTTPS页面

JavaScript实现强制重定向至HTTPS页面

admin 02-06 11:27 939次浏览

<script type="text/javascript">

var targetProtocol = "https:";

if (window.location.protocol != targetProtocol)

 window.location.href = targetProtocol +

  window.location.href.substring(window.location.protocol.length);

</script>

2017年软考 信息安全工程师 考试时间 css3禁止a标签禁止点击