我正在尝试将 jquery 加载到 Rhino 中,如此链接所示 here .但我不断收到以下错误:
line 1086: uncaught JavaScript runtime exception: TypeError: Cannot call method "importNode" of null
我认为是 jQuery 无法完全加载 - 但我不知道为什么。我使用的是作者在源代码管理中发布的相同 index.html 文件。
这是我的 Rhino 控制台的轨迹:
js> load( "/temp/env.js" );
js> window.location = '/temp/index.html';
/temp/index.html
js> load( "/temp/jquery.js" );
js: "/temp/jquery.js", line 1086: uncaught JavaScript runtime exception: TypeError: Cannot call method "importNode" of null
at /temp/jquery.js:1086
at /temp/jquery.js:1079
at /temp/jquery.js:16
at <stdin>:41
有什么想法吗?
最佳答案
关于javascript - 犀牛中的jquery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5089022/