Javascript 未捕获错误:NotSupportedError:DOM异常9

Javascript 未捕获错误:NotSupportedError:DOM异常9,javascript,jquery,html,createjs,Javascript,Jquery,Html,Createjs,我正在开发一个游戏(使用html5、createJS、Canvas),它正在本地成功地加载到wamp servr上,但它在web服务器上生成错误,如下所示 Uncaught Error: NotSupportedError: DOM Exception 9 prototype.js:1263 document._getElementsByXPath prototype.js:1263 document.getElementsByClassName prototype.js:1272 a jque

我正在开发一个游戏(使用html5、createJS、Canvas),它正在本地成功地加载到wamp servr上,但它在web服务器上生成错误,如下所示

Uncaught Error: NotSupportedError: DOM Exception 9 prototype.js:1263
document._getElementsByXPath prototype.js:1263
document.getElementsByClassName prototype.js:1272
a jquery-1.9.0.min.js:2
st.fn.extend.find jquery-1.9.0.min.js:2
st.fn.st.init jquery-1.9.0.min.js:1
st jquery-1.9.0.min.js:1
(anonymous function) index.php:95
f jquery-1.9.0.min.js:1
p.fireWith jquery-1.9.0.min.js:1
st.extend.ready jquery-1.9.0.min.js:1
原因可能是什么

谢谢
Anil Kumar

我也遇到了同样的问题,当代码在桌面Safari和Chrome中正常运行时,我从ios上的cordova应用程序中获得了“NotSupportedError:DOM Exception 9”。我使用
element.children[0]。children[0]
&
element.children[0]。children[1]
访问一个SVG元素。元素是一个包含
div
children[0]
was
svg
;和
children[0]
children[1]
rect
text

DOM的构造似乎是正确的

事实证明,在某些环境中,在我的示例mobile Safari中,SVG仅被视为XML,因此您需要使用

element.getElementsByTagName('rect')[0];
element.getElementsByTagName('text')[0];

此后一切正常。

使用google cdn或其他外部域的原型?我们正在使用jQuery JavaScript库v1.7.1签出此线程,非常感谢Konga Raju。我已经按照你提到的链接找到了满意的解决方案。