diff --git a/public/javascripts/jupyter.js b/public/javascripts/jupyter.js index 47fa61b80..021d46a2e 100644 --- a/public/javascripts/jupyter.js +++ b/public/javascripts/jupyter.js @@ -3,12 +3,14 @@ $(function(){ - console.log("educoder jupyter js init"); + console.log("开始发送消息了"); + runEvery10Sec(); }) - -$(function(){ - console.log("开始发送消息了"); +function runEvery10Sec() { + // 1000 * 10 = 10 秒钟 + console.log("每隔10秒中一次runEvery10Sec"); window.parent.postMessage('jupytermessage','*'); -}) + setTimeout( runEvery10Sec, 1000 * 10 ); +}