Javascript Xqib Hello World不工作

Javascript Xqib Hello World不工作,javascript,html,xquery,Javascript,Html,Xquery,我正在尝试实现xquery的基本示例,但在Hello World中遇到了问题。我已经正确下载并放置了mxqueryjs.nocache.js文件,所以我不知道问题出在哪里 这是我的代码: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <title>HelloWorld</title> <meta charset="UTF-8"/> &l

我正在尝试实现
xquery
的基本示例,但在Hello World中遇到了问题。我已经正确下载并放置了
mxqueryjs.nocache.js
文件,所以我不知道问题出在哪里

这是我的代码:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">  
    <title>HelloWorld</title>
    <meta charset="UTF-8"/>
    <script type="text/javascript" src="mxqueryjs/mxqueryjs.nocache.js"></script>
    <script type="application/xquery">
       b:alert("Hello World")
    </script>
  </head>
  <body>
    <h1>Hello world page.</h1>
  </body>
</html>
Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match. 6182B2DC971F7A2C7AEDC4F09F2BAE2D.cache.html:1
(anonymous function) 6182B2DC971F7A2C7AEDC4F09F2BAE2D.cache.html:1
Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match. 6182B2DC971F7A2C7AEDC4F09F2BAE2D.cache.html:2867
(anonymous function)
这将打开警报对话框并向世界问好,但它什么也不做。在线示例如下:


谢谢

您需要下载此模块:
www.xqib.org/js/module.xquery
并使用脚本标记导入它:

script type="application/xquery" src="path_to/module.xquery"

单击Ctrl+U以查看源。将源代码复制并替换到当前代码中。看看你是否仍然没有弹出窗口。如果你仍然没有,那不是你的代码把你搞砸了。让我们知道你在尝试后得到了什么。之前有没有这样做,没有任何改变,当html页面加载时有没有其他方法来执行xquery?你能在Chrome中打开开发者工具(按F12)并转到控制台查看是否有错误?是的,有2个错误,我有更新的问题。你的代码是否有可能在iframe中?