查询等待页面怎么做,100分求 要做一个功能,点击提交按钮后打开查询结果的页面,但是该查询结果页面相应时间比较长,需要有一个过渡页面,等查询结果页面显示完过渡页面自动关闭,不知道这个过渡页面应该怎么加进去?然后怎么判断查询结果页面已执行完? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 JAVASCRIPT 如果BODY 加载完了,就不要显示缓冲页面了 ajax,提供思路,未测试<table width="100%" height="100%" id=waiting><tr><td>等待中...</td></tr></table><script>var httprequest = ...httprequest.get(...if(httprequest.status==0){ document.body.innerhtml = httprequest.xml;}</script> kingdoom(坚持) ,有没有例子?关键就是不知道怎么判断body是否加载完? 可以在submit时,在页面上显示一个等待的图片,等查询完后页面就自己跳过去了要不就用ajax把 用ajax,直接用javascript不行我1年前试过 我们用java来解决实际问题。java技术交流,讨论java的技术细节和最新技术。欢迎中高级程序员以及渴望学习java技术的初学者加入讨论。QQ群:3001581 ajax没用过,各位大虾有没有相关例子参考一下啊,谢谢了 严重支持dreamover(梦醒了) 的ajax方法。我看看我有没有代码。等我哦 我用的就是这个javascript,单独写的一个js文件里面,直接调用这个就可以了,图片自己可以选择~~function waiting_init(){ document.write("<div name=\"div_waiting\" id=\"div_waiting\" "+ "style=\"display:none;background-color:#FF0000; POSITION: absolute;"+ "left:200px; top:120px; width:403px; height:224px;Z-INDEX:9999\"><iframe frameborder=0 height=224px width=403px></iframe>"+ "<div style='position:absolute;top:0;left:0;width:268;height:118;background-color:#336699;'> "+ "<table width=\"403\" height=\"224\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"images/waiting_bg.gif\">"+ "<tr>"+ "<td valign=\"bottom\">"+ "<p> </p>"+ "<p><br>"+ "<br>"+ "<br>"+ "<br>"+ "<br>"+ "</p>"+ "<table width=\"100%\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\">"+ "<tr> "+ " <td colspan=\"2\" height=\"16\"> </td>"+ "</tr>"+ "<tr> <td width=\"1\"></td>"+ " <td width=\"397\" height=\"24\" valign=\"top\" ><img src=\"images/waiting_pro.gif\" width=\"397\" height=\"19\"></td>"+ "</tr>"+ "</table>"+ "</td>"+ "</tr>"+ "</table></div>"+ "</div>");}waiting_init();function waiting(){ eval("div_waiting").style.top = 120+document.body.scrollTop; eval("div_waiting").style.display="";}function waiting_stop(){ eval("div_waiting").style.display="none";} <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>用户登陆</title><style type="text/css"> td { font-size:12px; } .poem{ font-size:15px;}</style><script language="javascript"> function loadimage(){ document.getElementById("randImage").src = "image.jsp?"+Math.random(); } </script><script language="JavaScript" src="js/js.js"></script><script language="javascript">function reg(){ location.href = "reg.htm";}// 处理返回信息的函数function processRequest(httpRequest) { document.all["dis"].style.display = ""; document.all["loginIn"].style.display = "none"; if (httpRequest.readyState == 4) { // 判断对象状态 if (httpRequest.status == 200) { // 信息已经成功返回,开始处理信息 document.all["dis"].style.display = "none"; document.all["loginIn"].style.display = ""; if(httpRequest.responseText == -1) { document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>用 户 名 错 误,请 重 新 输 入!</span>"; } else if (httpRequest.responseText == 0) { document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>密 码 错 误,请 重 新 输 入!</span>"; } else if (httpRequest.responseText == 1) { document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>恭 喜 您 登 陆 成 功!<a href='userList.htm'><font color='#0066CC'>查看列表</fonr><a></span>"; } else { //页面不正常 alert("您所请求的页面有异常。"); } } }}//响应事件function userLogin() { var f = document.LoginForm; var username = f.username.value; var pwd = f.pwd.value; var rand = f.rand.value; if(username == "" || pwd == "") { document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>用 户 名 或 密 码 不 能 为 空!</span>"; return false; } else if(rand == ""){ document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>请 输 入 上 图 所 示 验 证 码!</span>"; return false; } var data = 'username='+username+'&pwd='+pwd; send_request("POST",data,"login.jsp",processRequest);}</script></head><body><div id="dis" style="display:none; margin-top:150px; position:absolute; text-align:center; border:1px #999999 solid; left:407px; top:81px; width:200px; height:60px; z-index:1"><table style="margin-top:22px; "><tr><td><span style="color:#999999; font-size:12px; ">正在登陆,请稍候 ......</span></td></tr></table></div><table style="margin-top:150px; " id="loginIn" cellpadding="0" align="center" cellspacing="0" bordercolordark="#FFFFFF"> <tr> <td colspan="2"> <table cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF"> <tr> <td align="right" valign="bottom"><img src="img/left.gif" border="0"></td> <td align="center" valign="bottom"><img src="img/center.gif" border="0"></td> <td align="left" valign="bottom"><img src="img/right.gif" border="0"></td> </tr> </table> </td> </tr> <tr> <td width="102" height="112" align="right"><img src="img/login.gif" style="margin-top:5px; "></td> <td width="213" align="center" valign="top"> <table width="191" height="159" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF"> <tr> <td height="25" colspan="2"></td> </tr> <form action="index.php" name="LoginForm" method="GET"> <tr> <td width="67" height="25" align="right"><span style="color:#666666;"><b>用户名</b></span><font color="#666666">:</font></td> <td width="122"><input type="text" id="username" name="username" style="border:0; border-bottom:1px #183390 dotted; height:20; width:90px; color:#6633CC;" onkeydown="javascript:if(event.keyCode==13){document.LoginForm.pwd.focus();}"></td> </tr> <tr> <td width="67" height="25" align="right"><span style="color:#666666;"><b>密 码</b></span><font color="#666666">:</font></td> <td width="122"><input type="password" id="pwd" name="pwd" style="border:0; border-bottom:1px #183390 dotted; height:20; width:90px; color:#6633CC;" onkeydown="javascript:if(event.keyCode==13){document.LoginForm.rand.focus();}"></td> </tr> <tr> <td width="67" height="25" align="right"><span style="color:#666666;"><b>验证码</b></span><font color="#666666">:</font></td> <td width="122"><input type="text" id="rand" name="rand" style="border:0; border-bottom:1px #183390 dotted; height:20; width:90px; color:#6633CC;" onkeydown="javascript:if(event.keyCode==13){document.LoginForm.login.focus();}" maxlength="4"></td> </tr> <tr> <td height="22" colspan="2" align="left" valign="bottom"> <img alt="code..." name="randImage" id="randImage" src="image.jsp" width="60" height="20" border="1" align="absmiddle"> <a href="javascript:loadimage();">看不清点我</a></td> </tr> <tr> <td height="35" colspan="2" align="left" valign="bottom"> <input type="button" onClick="javascript:userLogin();" name="login" value="登 录" style="background:#FFFFFF; border:1px #183390 solid;"> <input type="button" onClick="javascript:reg();" name="regist" value="注 册" style="background:#FFFFFF; border:1px #183390 solid;"></td> </tr> </form> </table> </td> </tr> <tr> <td height="23" colspan="2" align="left" valign="middle"><span id="report" style="margin-left:80px;"></span></td> </tr> <tr> <td height="2" colspan="2" background="img/bottom.gif"></td> </tr> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="25" align="center" valign="bottom" class="poem">日 暮 苍 山 </td> </tr> <tr> <td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>日</b></font> 暮 苍 山 兰 舟 <font color="#CC00FF"><b>小</b></font> ,</td> </tr> <tr> <td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>本</b></font> 无 落 霞 缀 清 <font color="#CC00FF"><b>泉</b></font> 。</td> </tr> <tr> <td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>去</b></font> 年 叶 落 缘 分 <font color="#CC00FF"><b>定</b></font> ,</td> </tr> <tr> <td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>死</b></font> 水 微 漾 人 却 <font color="#CC00FF"><b>亡</b></font> 。</td> </tr> </table></td> </tr> <tr> <td height="4" colspan="2"></td> </tr> <tr> <td height="2" colspan="2" background="img/bottom.gif"></td> </tr></table></body></html> 小白刚学习java,很多不懂得,求详细解释 c/s客户端等待服务器信息时无响应 菜鸟匿名内部类的问题 请问如何取得JComboBox选中的值,谢谢 怀疑书上的有错(this的用法) CSV文件解析, 用正则表达式完成。 求助!!关于一个函数库的通用控制函数的的写法问题! 请教关于线程的问题!急!!在线等结果,马上结分 JAVA中有没有和这个功能相近的函数? JAVA的内存可以开多大,数组的大小有限制吗? 新手上路:关于字体的属性该用什么包? 为什么结果和书上讲的不一样
<tr>
<td>等待中...</td>
</tr>
</table>
<script>
var httprequest = ...
httprequest.get(...
if(httprequest.status==0){
document.body.innerhtml = httprequest.xml;
}
</script>
要不就用ajax把
我1年前试过
我看看我有没有代码。
等我哦
{
document.write("<div name=\"div_waiting\" id=\"div_waiting\" "+
"style=\"display:none;background-color:#FF0000; POSITION: absolute;"+
"left:200px; top:120px; width:403px; height:224px;Z-INDEX:9999\"><iframe frameborder=0 height=224px width=403px></iframe>"+
"<div style='position:absolute;top:0;left:0;width:268;height:118;background-color:#336699;'> "+
"<table width=\"403\" height=\"224\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"images/waiting_bg.gif\">"+
"<tr>"+
"<td valign=\"bottom\">"+
"<p> </p>"+
"<p><br>"+
"<br>"+
"<br>"+
"<br>"+
"<br>"+
"</p>"+
"<table width=\"100%\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\">"+
"<tr> "+
" <td colspan=\"2\" height=\"16\"> </td>"+
"</tr>"+
"<tr> <td width=\"1\"></td>"+
" <td width=\"397\" height=\"24\" valign=\"top\" ><img src=\"images/waiting_pro.gif\" width=\"397\" height=\"19\"></td>"+
"</tr>"+
"</table>"+
"</td>"+
"</tr>"+
"</table></div>"+
"</div>");
}
waiting_init();function waiting()
{
eval("div_waiting").style.top = 120+document.body.scrollTop;
eval("div_waiting").style.display="";
}function waiting_stop()
{
eval("div_waiting").style.display="none";
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户登陆</title>
<style type="text/css">
td { font-size:12px; }
.poem{ font-size:15px;}
</style>
<script language="javascript">
function loadimage(){
document.getElementById("randImage").src = "image.jsp?"+Math.random();
}
</script>
<script language="JavaScript" src="js/js.js"></script>
<script language="javascript">
function reg()
{
location.href = "reg.htm";
}// 处理返回信息的函数
function processRequest(httpRequest) {
document.all["dis"].style.display = "";
document.all["loginIn"].style.display = "none";
if (httpRequest.readyState == 4) { // 判断对象状态
if (httpRequest.status == 200) { // 信息已经成功返回,开始处理信息
document.all["dis"].style.display = "none";
document.all["loginIn"].style.display = "";
if(httpRequest.responseText == -1) {
document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>用 户 名 错 误,请 重 新 输 入!</span>";
} else if (httpRequest.responseText == 0) {
document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>密 码 错 误,请 重 新 输 入!</span>";
} else if (httpRequest.responseText == 1) {
document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>恭 喜 您 登 陆 成 功!<a href='userList.htm'><font color='#0066CC'>查看列表</fonr><a></span>";
} else { //页面不正常
alert("您所请求的页面有异常。");
}
}
}
}//响应事件
function userLogin() {
var f = document.LoginForm;
var username = f.username.value;
var pwd = f.pwd.value;
var rand = f.rand.value;
if(username == "" || pwd == "") {
document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>用 户 名 或 密 码 不 能 为 空!</span>";
return false;
} else if(rand == ""){
document.all["report"].innerHTML = "<span style='color:#0066CC; font-size:12px;'>请 输 入 上 图 所 示 验 证 码!</span>";
return false;
}
var data = 'username='+username+'&pwd='+pwd;
send_request("POST",data,"login.jsp",processRequest);
}
</script>
</head>
<body>
<div id="dis" style="display:none; margin-top:150px; position:absolute; text-align:center; border:1px #999999 solid; left:407px; top:81px; width:200px; height:60px; z-index:1">
<table style="margin-top:22px; "><tr><td><span style="color:#999999; font-size:12px; ">正在登陆,请稍候 ......</span></td></tr></table></div>
<table style="margin-top:150px; " id="loginIn" cellpadding="0" align="center" cellspacing="0" bordercolordark="#FFFFFF">
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF">
<tr>
<td align="right" valign="bottom"><img src="img/left.gif" border="0"></td>
<td align="center" valign="bottom"><img src="img/center.gif" border="0"></td>
<td align="left" valign="bottom"><img src="img/right.gif" border="0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="102" height="112" align="right"><img src="img/login.gif" style="margin-top:5px; "></td>
<td width="213" align="center" valign="top">
<table width="191" height="159" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF">
<tr>
<td height="25" colspan="2"></td>
</tr>
<form action="index.php" name="LoginForm" method="GET">
<tr>
<td width="67" height="25" align="right"><span style="color:#666666;"><b>用户名</b></span><font color="#666666">:</font></td>
<td width="122"><input type="text" id="username" name="username" style="border:0; border-bottom:1px #183390 dotted; height:20; width:90px; color:#6633CC;" onkeydown="javascript:if(event.keyCode==13){document.LoginForm.pwd.focus();}"></td>
</tr>
<tr>
<td width="67" height="25" align="right"><span style="color:#666666;"><b>密 码</b></span><font color="#666666">:</font></td>
<td width="122"><input type="password" id="pwd" name="pwd" style="border:0; border-bottom:1px #183390 dotted; height:20; width:90px; color:#6633CC;" onkeydown="javascript:if(event.keyCode==13){document.LoginForm.rand.focus();}"></td>
</tr>
<tr>
<td width="67" height="25" align="right"><span style="color:#666666;"><b>验证码</b></span><font color="#666666">:</font></td>
<td width="122"><input type="text" id="rand" name="rand" style="border:0; border-bottom:1px #183390 dotted; height:20; width:90px; color:#6633CC;" onkeydown="javascript:if(event.keyCode==13){document.LoginForm.login.focus();}" maxlength="4"></td>
</tr>
<tr>
<td height="22" colspan="2" align="left" valign="bottom"> <img alt="code..." name="randImage" id="randImage" src="image.jsp" width="60" height="20" border="1" align="absmiddle"> <a href="javascript:loadimage();">看不清点我</a></td>
</tr>
<tr>
<td height="35" colspan="2" align="left" valign="bottom"> <input type="button" onClick="javascript:userLogin();" name="login" value="登 录" style="background:#FFFFFF; border:1px #183390 solid;"> <input type="button" onClick="javascript:reg();" name="regist" value="注 册" style="background:#FFFFFF; border:1px #183390 solid;"></td>
</tr>
</form>
</table>
</td>
</tr>
<tr>
<td height="23" colspan="2" align="left" valign="middle"><span id="report" style="margin-left:80px;"></span></td>
</tr>
<tr>
<td height="2" colspan="2" background="img/bottom.gif"></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="center" valign="bottom" class="poem">日 暮 苍 山 </td>
</tr>
<tr>
<td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>日</b></font> 暮 苍 山 兰 舟 <font color="#CC00FF"><b>小</b></font> ,</td>
</tr>
<tr>
<td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>本</b></font> 无 落 霞 缀 清 <font color="#CC00FF"><b>泉</b></font> 。</td>
</tr>
<tr>
<td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>去</b></font> 年 叶 落 缘 分 <font color="#CC00FF"><b>定</b></font> ,</td>
</tr>
<tr>
<td height="25" align="center" valign="bottom" class="poem"><font color="#CC00FF"><b>死</b></font> 水 微 漾 人 却 <font color="#CC00FF"><b>亡</b></font> 。</td>
</tr>
</table></td>
</tr>
<tr>
<td height="4" colspan="2"></td>
</tr>
<tr>
<td height="2" colspan="2" background="img/bottom.gif"></td>
</tr>
</table>
</body>
</html>