Javascript jquery加载映像没有停止吗?
我遇到了一个奇怪的问题,我正在制作一个jquery移动模板,ajax loadin图像会弹出,但不会消失我不知道为什么它会卡在我的代码中:Javascript jquery加载映像没有停止吗?,javascript,jquery,html,Javascript,Jquery,Html,我遇到了一个奇怪的问题,我正在制作一个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>
<!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>
无标题文件
函数签名(){
变量名称=$(“#用户”);
var pass=$(“#pass”);
如果(name.val()=“”| | pass.val()=“”){
警报(“请输入您的用户名和密码”);
name.val(“”);
pass.val(“”);
}否则{
$.post(”http://localhost/teezy/api/index.php?name=“+name.val()+”&pass=“+pass.val(),函数(数据){
如果(数据==“错误的用户名或密码”){
警报(数据);
name.val(“”);
pass.val(“”);
}否则{
$(document.location.replace('index2.html');
}
});
}
}
标题
用户名:
密码
登录
&抄袭;标题
在我单击某个内容之前,它一直在每个页面上。看起来您包括了移动样式表和javascript的缩小版和未缩小版。你试过不那样做吗?呜呜谢谢。。。我怎么忘了?