location.href.replace

一叶一菩提11 2017-01-17 04:58:05
var request_head = 'https://www.dns.la';
if (request_head == 'http://www.dns.la') location.href = location.href.replace('http://www.dns.la', 'https://www.dns.la');
if (request_head == 'http://dns.la') location.href = location.href.replace('http://dns.la', 'https://dns.la');
请问这一段代码有什么作用呢
...全文
422 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Voe 2017-02-08
  • 打赏
  • 举报
回复
页面跳转··········

25,988

社区成员

发帖
与我相关
我的任务
社区描述
高性能WEB开发
社区管理员
  • 高性能WEB开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧