在下面的job.js
节点脚本中,我如何调用/getJobs
。我使用以下方式但得到$ is not defined.
job.js
var jobScedule = function (time, jobid) {
var params = {
"id": jobid
};
$.get('/getJobs', params, function (data) {
console.log(data);
});
}
脚本.js
.......
......
switch(context.pathname) {
case '/getJobs':
testUtils.runTest(context);
break;
}