var targetProtocol = "https:";
if (window.location.protocol != targetProtocol){
window.location.href = targetProtocol + window.location.href.substring(window.location.protocol.length);
}
var targetProtocol = "https:";
if (window.location.protocol != targetProtocol){
window.location.href = targetProtocol + window.location.href.substring(window.location.protocol.length);
}
本文标题:js实现http跳转https
本文链接:https://www.haomeiwen.com/subject/lecaactx.html
网友评论