访问http协议直接挑战https的一句JS段落(图1)


  <script type="text/javascript">

    // $(function(){

        var selfUrl = window.location.href;

        if (-1 < selfUrl.indexOf('http://')) {

          selfUrl = selfUrl.replace('http://', 'https://');

          window.location.href = selfUrl;

        }

    // });

</script>