[英]jQuery Mobile does not move to the next page after clicking on anchor tag
[英]Specifying a jQuery mobile main page
给定具有多个页面的jQuery Mobile应用程序
Home.html > Profile.html > Registration.html > ...
如何设置我的应用程序,以便Home
是第一个加载的页面,当用户在移动设备上启动应用程序时会显示给用户?
这取决于你在做什么。
如果要创建一个基本的移动网页,这取决于您的Web服务器。 如果使用Apache Web服务器,则应更改httpd.conf并替换为:
DirectoryIndex index.html
有了这个:
DirectoryIndex index.html main.html
或者,如果您无权访问Web服务器,则可以在项目目录中创建.htaccess ,然后执行与上述相同的操作。 在此处了解更多信息。
另一方面,如果您正在使用Phonegap,那么您要做的就是更改位置Phonegap查找应用程序初始化。
这是Android示例:
super.loadUrl("file:///android_asset/www/main.html");
在此处了解更多信息。
但是您应该遵循标准并将主文件重命名为index.html
iOS与Android有所不同,您需要更改一些配置,从而迫使iOS加载与index.html不同的文件。
在“类”文件夹中,打开AppDelegate.m并进行以下更改:
self.viewController.startPage = @"index.html";
对此:
self.viewController.startPage = @"main.html";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.