Javascript jquerymobile-DOM异常18

Javascript jquerymobile-DOM异常18,javascript,jquery,iphone,mobile,jquery-mobile,Javascript,Jquery,Iphone,Mobile,Jquery Mobile,我正在尝试使用jQuery mobile,但似乎无法开始 我在本地服务器上托管了以下HMTL文件: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="

我正在尝试使用jQuery mobile,但似乎无法开始

我在本地服务器上托管了以下HMTL文件:

<!DOCTYPE html> 
<html> 
<head> 
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</head> 
<body>
</body>
</html>

导致

Javascript错误:未定义的安全错误:DOM异常18


从我的iPhone从

访问时,在jquery脚本包含标记之前,您是否也链接了CSS样式表文件

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>

此外,为了使页面显示,您必须将内容包含到如下容器中:

<body>
  <div data-role='page'>
    <div data-role='header'>
    Header goes here
    </div>
    <div data-role='content'>
    Content goes here
    </div>
  </div>
</body>

标题在这里
内容在这里

您尝试过使用谷歌吗?似乎有一些非常好的结果:是的,但它们主要是关于webkit通知或本地文件。我希望熟悉jQuery mobile的人能够了解我无法加载脚本的原因。您遇到的错误很可能与您正在本地计算机上测试有关。