js获取主机名实现页面跳转

 <script language="javascript" type="text/javascript">
        var hostname = location.hostname;
        window.location.href="https://" + hostname + "/merchant/";
 </script>

posted @ 2018-01-19 16:32  FlyBack  阅读(340)  评论(0编辑  收藏  举报