我在试图用JQUERY Mobile做一些基本的东西时遇到了一些问题。
我正在尝试从index.html上的登录表单链接到包含3个数据角色页面元素的dashboard.html,但我一直收到“错误加载页面”。
<pre><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Custom css -->
<link rel="stylesheet" type="text/css" href="css/jquery.mobile.flatui.css" />
<script src="js/jquery.js"></script>
<script src="js/jquery.mobile-1.4.0-rc.1.js"></script>
</head>
<body>
<div data-role="page">
<!-- header -->
<div data-role="header">
<a data-iconpos="notext" href="#panel-01" data-role="button" data-icon="home"></a>
<h1>Login</h1>
</div>
<!-- content -->
<div data-role="content" role="main">
<form id="Form2" method="POST">
<div data-role="fieldcontain">
<label for="url">Email</label>
<input class="required" id="Text2" name="uid_r" type="text" value="">
</div>
<div data-role="fieldcontain">
<label for="url">Password</label>
<input id="Password2" name="pwd_r" type="password" value="">
</div>
<div class="ui-grid-a">
<div class="ui-body ui-body-b">
<a href="dashboard.html" data-role="button">Login</a>
</div>
</div>
<div class="ui-grid-b">
<div class="ui-body ui-body-b">
<div >
<a href="#register" data-role="button">Register</a>
</div>
<div>
<a href="#forgot" data-role="button">Forgot Password</a>
</div>
</div>
</div>
</form>
</div>
<!-- footer -->
</div><!-- page -->
<!-- Forgot Password -->
<div data-role="page" id="forgot">
<!-- header -->
<div data-role="header">
<h1>Forgot Password</h1>
</div>
<!-- content -->
<div data-role="content" role="main">
<form id="Form2" method="POST">
<div data-role="fieldcontain">
<label for="url">Email</label>
<input class="required" id="Text2" name="uid_r" type="text" value="">
</div>
<div class="ui-grid-a">
<div class="ui-body ui-body-a">
<a href="#" data-role="button">Submit</a>
</div>
</div>
</form>
</div>
<!-- footer -->
</div><!-- page -->
<!-- Register-->
<div data-role="page" id="register">
<!-- header -->
<div data-role="header">
<a data-iconpos="notext" href="index.html" data-role="button" data-icon="arrow-l"></a>
<h1>Register</h1>
</div>
<!-- content -->
<div data-role="content" role="main">
<form id="Form2" method="POST" src="index.html">
<div data-role="fieldcontain">
<label for="email">Email</label>
<input class="required" id="email" name="uid_r" type="email" value="">
</div>
<div data-role="fieldcontain">
<label for="password">Password</label>
<input id="Password2" name="password" type="password" value="">
</div>
<div data-role="fieldcontain">
<label for="password-confirm">Confirm Password</label>
<input id="password-confirm" name="password-confirm" type="password" value="">
</div>
<div data-role="fieldcontain">
<label for="firstname">Firstname</label>
<input id="Password2" name="firstname" type="text" value="">
</div>
<div data-role="fieldcontain">
<label for="surname">Surname</label>
<input id="Password2" name="surname" type="text" value="">
</div>
<div data-role="">
<label for="gender" class="select">Gender</label>
<select name="gender" id="gender">
<option value="male">Male</option>
<option value="female">Female</option>
</select>
</div>
<div data-role="school">
<label for="school">School</label>
<input id="school" name="school" type="text" value="">
</div>
<div data-role="location">
<label for="location">Location</label>
<input id="location" name="location" type="text" value="">
</div>
<div class="ui-grid-a">
<div class="ui-body ui-body-a">
<div>
<button data-theme="a" type="submit">Register</button>
</div>
</div>
</div>
</form>
</div>
<!-- footer -->
</div><!-- page -->
</body>
</html>
</pre>