Ich versuche, die ConvNetJS example über die Cloud9 Online-IDE auszuführen. Das Skript enthalten funktioniert, wenn es innerhalb des HTML ist, aber nicht, wenn ich es verknüpfen wie folgt:Wie HTTP-bezogenes Javascript auf HTTPS-Site ausgeführt wird?
<html>
<head>
<title>minimal demo</title>
<!-- CSS goes here -->
<style>
body {
background-color: #FFF; /* example... */
}
</style>
<!-- http://jquery.com/ -->
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>
<!-- http://getbootstrap.com/ -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- import convnetjs library -->
<script src="//cs.stanford.edu/people/karpathy/convnetjs/build/convnet-min.js"></script>
<!-- app's own JavaScript -->
<!--script type="text/javscript" src="../static/script.js"></script-->
</head>
<body>
<div id="egdiv"></div>
</body>
</html>
mit dem Javascript innen script.js
:
function periodic() {
var d = document.getElementById('egdiv');
d.innerHTML = 'Random number: ' + Math.random();
};
var net; // declared outside -> global variable in window scope
$(function start() {
// this gets executed on startup
net = new convnetjs.Net();
// example of running something every 1 second
setInterval(periodic, 1000);
});
Wenn ich die Anwendung über die IDE ausführen, bekomme ich das Warnung über die Konsole: Mixed Content: The page at 'https://ide50-stephenwist.cs50.io/' was loaded over HTTPS, but requested an insecure script 'http://cs.stanford.edu/people/karpathy/convnetjs/build/convnet-min.js'. This content should also be served over HTTPS.
Wie komme ich um diese? Ich verwende Chrome und lasse "unsichere Skripte" laufen. Vielen Dank, dass Sie dies lesen, here's a puppy
Dank dieser wurde die Warnung los. Es scheint, mein Problem mit dem Skript nicht ausgeführt wird, wenn ein Problem mit Flask verknüpft ist. –