在java中如何使用jquery在上传文件的时候显示进度条(下载)
若以下回答无法解决问题,邀请你更新回答
3个回答
展开全部
jQuery progressBar 这个插件支持的,我也没玩过,你试试吧
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
基本上找到这个插件就可以搞定啦~
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
aa.php文件:
<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="Zend Studio" />
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>登录</title>
<script type="text/javascript">
var XHR;
function getXHR(){
if(window.ActiveXObject)
{
XHR = new ActiveXObject("Microsoft.XMLHttp");
}
else
{
XHR = new XMLHttpRequest();
}
var user=document.getElementById("username").value;
XHR.open("GET","some.php?time="+new Date().getTime());
XHR.onreadystatechange=function()
{
if(XHR.readyState==1)
{
document.getElementById("cc").style.display="block";
}
if(XHR.readyState==4 && XHR.status==200)
{
document.getElementById("cc").style.display="none";
}
}
XHR.send(null);
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#FF9966" vlink="#FF9966" alink="#FFCC99">
用户登录:
<hr />
<form action="some.php" method="GET">
<table>
<tr>
<td>用户名:</td>
<td><input type="text" name="username" id="username" onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor='green'" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="password" id="password" onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor='green'" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" id="bn_zc" value="登录" onclick="getXHR()" /> <input type="reset" value="取消" /></td>
</tr>
</table>
</form>
<div id="cc" style="display:none;"><img src="1322181.gif" /></div>
</body>
</html>
some.php文件:
<?php
header("Content-Type:text/html; charset=gbk");
sleep(3);
include("conn.php");
$user=$_GET['username'];
$password=$_GET['password'];
//echo $user,$password,$sex,$mail;
$flag1=login($user,$password);
if($flag1)
{
echo "<font color='red'>登录成功!</font>";
}
else
{
echo "<font color='green'>登录失败!</font>";
}
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="Zend Studio" />
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>登录</title>
<script type="text/javascript">
var XHR;
function getXHR(){
if(window.ActiveXObject)
{
XHR = new ActiveXObject("Microsoft.XMLHttp");
}
else
{
XHR = new XMLHttpRequest();
}
var user=document.getElementById("username").value;
XHR.open("GET","some.php?time="+new Date().getTime());
XHR.onreadystatechange=function()
{
if(XHR.readyState==1)
{
document.getElementById("cc").style.display="block";
}
if(XHR.readyState==4 && XHR.status==200)
{
document.getElementById("cc").style.display="none";
}
}
XHR.send(null);
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#FF9966" vlink="#FF9966" alink="#FFCC99">
用户登录:
<hr />
<form action="some.php" method="GET">
<table>
<tr>
<td>用户名:</td>
<td><input type="text" name="username" id="username" onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor='green'" /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="password" id="password" onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor='green'" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" id="bn_zc" value="登录" onclick="getXHR()" /> <input type="reset" value="取消" /></td>
</tr>
</table>
</form>
<div id="cc" style="display:none;"><img src="1322181.gif" /></div>
</body>
</html>
some.php文件:
<?php
header("Content-Type:text/html; charset=gbk");
sleep(3);
include("conn.php");
$user=$_GET['username'];
$password=$_GET['password'];
//echo $user,$password,$sex,$mail;
$flag1=login($user,$password);
if($flag1)
{
echo "<font color='red'>登录成功!</font>";
}
else
{
echo "<font color='green'>登录失败!</font>";
}
?>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询