你好,我对moodle是个新手。我一直在尝试测试我的Javascript是否可以运行,但没有结果。这就是我所拥有的:
在/videojs/amd/src中,我使用一个简单的命令创建了一个test.js文件
define(['jquery'], function() {
return {
init: function() {
// Put whatever you like here. $ is available
// to you as normal.
alert("It changed!!");
}
};
});然后我运行文件,一切都成功了,并进行了最小化。但当我转到该页面时,它不会运行。现在我读了Moodle's Javascript Doc,我看到它说
The idea here is that we will run the 'init' function from our (PHP) code to set things up. This is called from PHP like this...我该在哪里调用这个PHP?
https://stackoverflow.com/questions/44684299
复制相似问题