我的代码是这样的:
<div data-role="page" id="LoginPage">
<div data-role="header">
<p style="text-align:right;">Welcome</p>
</div>
<div data-role="main" class="ui-content">
<center><img src="taybe.png" style="width:80%; height:80%;" /></center>
<p style="text-align:right;">ID NUMBER</p>
<input type="number" id="UserIDTXT"/>
<p id="IDnote" style="text-align:right;color:red;"></p>
<p style="text-align:right;">PASS</p>
<input type="password" id="UserPassTXT"/>
<p id="Passnote" style="text-align:right;color:red;"></p>
<table style="width:100%;">
<tr >
<td style="width:45%; height:80%;"><input type="button" value="Login" onclick="checkDetails()" /></td>
<td style="width:45%; height:80%;"><input type="button" value="Visitor" /></td>
</tr>
</table>
<input style="width:100%; height:10%;" type="button" value="Register" />
</div>
<div data-role="footer">
</div>
</div>
这是我要打开的主页,例如我的ID是1234,密码是123123123
<div data-role="page" id="HomePage">
<div data-role="header" data-tap-toggle="true" data-theme='b'>
Here is the homepage
</div>
</div>
我需要写什么来访问checkDetails fucntion中的主页?
if (($("#UserIDTXT").val() == "3164") && ($("#UserPassTXT").val()) == "12345678")
{
/*what i need to type here ???*/
}
答案 0 :(得分:-1)
简单地说,
$('#LoginPage').hide(function(){
$('#HomePage').show();
})