SSL安装后,某些脚本停止工作

wis*_*ser 0 javascript ssl https jquery

我使用以下代码打印div元素内的内容.这对我来说很好,直到我在我的服务器中安装了SSL证书.如果我通过访问页面,代码仍然有效http://.但是,通过访问同一页面时它无法正常工作https://.我需要帮助解决这个问题.

function PrintElem(elem)
{
    Popup($(elem).html());
}

function Popup(data) 
{
    var mywindow = window.open('', 'Business Sense Chart', 'height=600,width=1200');
    mywindow.document.write('<html><head><title>Business Sense Analytics</title>'); 
    mywindow.document.write('<link rel="stylesheet" href="./css/style.css" type="text/css" />');
    mywindow.document.write('</head><body><center>');
    mywindow.document.write(data);
    mywindow.document.write('</center></body></html>');
    mywindow.print();
    return true;
}
Run Code Online (Sandbox Code Playgroud)

注意:当我使用firebug诊断错误时,它显示错误"$不是函数".类似的其他脚本也面临同样的问题.

cee*_*yoz 7

注意:当我使用firebug诊断错误时,它显示错误"$不是函数".类似的其他脚本也面临同样的问题.

您最有可能从HTTP URL(可能是CDN)加载jQuery,这会导致浏览器将其阻止为不安全.所有资产 - 图像,脚本,CSS等 - 都需要在HTTPS页面上使用HTTPS.