【问题标题】:JavaScript Buttons don't work with a HTTPS ConnectionJavaScript 按钮不适用于 HTTPS 连接
【发布时间】:2013-04-29 06:59:08
【问题描述】:

当我转到我网站的游戏部分时,按钮可以正常工作:http://sharepanel.net/games/

当我通过安全 SSL 连接访问页面时,按钮不执行任何操作:https://sharepanel.net/games/

我错过了什么吗?

这是按钮的 Javascript 代码:

<script>
    function getPage(el,page){
        $(el).load(page, function(response, status, xhr) {

            if (status == "error") {
                var msg = "Error While Loading Page: ";
                $(el).html(msg + xhr.status + " - " + xhr.statusText);
            }
        });
    }

$(function(){
    $("#top10").on("click",function(){
        getPage("#main","/games/top10.php");
    });

    $("#action").on("click",function(){
        getPage("#main","action.php");
    });

    $("#adventure").on("click",function(){
        getPage("#main","adventure.php");
    });

    $("#timemanage").on("click",function(){
        getPage("#main","timemanage.php");
    });

    $("#fungames").on("click",function(){
        getPage("#main","fungames.php");
    });

    $("#newgames").on("click",function(){
        getPage("#main","newgames.php");
    });

    $("#randomgames").on("click",function(){
        getPage("#main","randomgames.php");
    });
});
</script>

【问题讨论】:

标签: javascript jquery button ssl


【解决方案1】:

感谢大家的帮助,

我刚刚通过将所有 jQuery 文件保存到我的网站并将 jQuery 代码的 url 替换为我的网络服务器上的 url 来解决这个问题。

谢谢 呵呵

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-11-23
    • 2020-01-27
    • 2011-07-07
    • 1970-01-01
    • 2018-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多