我有一个奇怪的问题我正在制作一个jquery移动模板并且ajax loadin图像弹出并且不会去我不知道为什么它卡在这里是我的代码:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<link href="./style/jquery.mobile-1.0rc2.min.css" rel="stylesheet" type="text/css" />
<link href="./style/jquery.mobile-1.0rc2.css" rel="stylesheet" type="text/css" />
<script src="./style/jquery-1.7.js" type="text/javascript"></script>
<script src="./style/jquery.mobile-1.0rc2.min.js" type="text/javascript"></script>
<script src="./style/jquery.mobile-1.0rc2.js" type="text/javascript"></script>
<script type="text/javascript">
function signin(){
var name = $('#user');
var pass = $('#pass');
if(name.val() == "" || pass.val() == ""){
alert("Please enter your username and password");
name.val('');
pass.val('');
}else{
$.post("http://localhost/teezy/api/index.php?name="+name.val()+"&pass="+pass.val(), function(data){
if(data == "Wrong Username or Password"){
alert(data);
name.val('');
pass.val('');
}else{
$(document.location.replace('index2.html'));
}
});
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div data-role="page" id="page">
<div data-role="header">
<h1>TITLE</h1>
</div>
<div data-role="content">
<div id="login" data-role="fieldcontain">
<label for="user">Username:</label>
<input type="text" name="user" id="user" value="" placeholder="Username" />
<label for="pass">Password</label>
<input type="password" name="pass" id="pass" value="" placeholder="Password" />
<button data-icon="check" onclick="signin()">Login</button>
</div>
</div>
<div data-role="footer">
<h4>© TITLE</h4>
</div>
</div>
</body>
</html>
直到我点击某些内容,它才出现在每一页上。