Phonegap jquerymobile href到服务器端html



IN一个phonegap jquery mobile index.html,它在服务器端有一个achor href(http://mywebsite.com/products.html并且不使用rel=external)。当点击并加载时,如何确保products.html.仍然可以访问index.html中的js文件

似乎在加载product.html时,index.html中的.js文件是不可访问的。我不想在products.html中重复所有这些。解决方案是什么?当不在PhoneGap和浏览器中运行时,index.html中的.js脚本文件似乎仍然可用。

我使用的是最新版本的phonegap和Jquery mobile 1.3.0和Jquery 1.7。

如果使用jquery mobile它和您使用$.load一样因此,您的站点中的脚本和样式表不会加载。但是,如果您将脚本和css放在datarole="page"中,则可以加载js和css。。例如

<body>
  <div data-role="page">
         your js file and css file place in here for can be load
  </div>
</body>

最新更新