Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/223.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android JQueryMobile和PhoneGap_Android_Cordova_Jquery Mobile - Fatal编程技术网

Android JQueryMobile和PhoneGap

Android JQueryMobile和PhoneGap,android,cordova,jquery-mobile,Android,Cordova,Jquery Mobile,我正在尝试开发一个注册android登录应用程序,使用 JQueryMobile和Phonegap。输入用户名和密码时出现的问题 已被服务器验证,我不知道如何将用户重定向到他的 个人主页,当我提醒用户 用户名和密码正确。 2) 在Phonegap中,有必要吗 将所有代码放在一个www/index.html文件中?我们不能创造吗 另一个html文件来链接它?它仍然可以作为android应用程序使用吗? 谢谢 您可以有多个页面(html) 在index.html页面中只有脚本和其他详细信息,其结构如

我正在尝试开发一个注册android登录应用程序,使用 JQueryMobile和Phonegap。输入用户名和密码时出现的问题 已被服务器验证,我不知道如何将用户重定向到他的 个人主页,当我提醒用户 用户名和密码正确。
2) 在Phonegap中,有必要吗 将所有代码放在一个www/index.html文件中?我们不能创造吗 另一个html文件来链接它?它仍然可以作为android应用程序使用吗?
谢谢

您可以有多个页面(html)

在index.html页面中只有脚本和其他详细信息,其结构如下:

<!DOCTYPE HTML>
<html>
<head>
<title>Demo</title> 
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />    

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />

<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

</head>
<body>


<div id="pageIndex" data-role="page" class="content" data-theme='b'>

</div>

</body>
</html>

您可以在应用程序中有多个html页面,您可以使用window.open(“)打开html页面,或者了解InAppBrowser插件
<div id="pageLogin" data-role="page" class="content" data-theme='b'>

<div  data-role="header" data-position="fixed" data-tap-toggle="false" data-theme='b'>
<h1>Header - Login Page</h1>
</div>
<div data-role="content">
Content for Login Page

</div>
</div>
 $(document).on("pageshow", "#pageIndex", function () { 
    //directly navigate to the login page
    $.mobile.changePage("html/pageLogin.html");
 });

 $(document).on("pageshow", "#pageLogin", function () { 
    //directly navigate to the home page on validation of user in login buttion click event
    $.mobile.changePage("html/pageHome.html");
 });