我在工行网上看到网页跳转进程条很漂亮,帮我修改下代码好吗?或提供类似的代码给我,谢谢!
网址:
http://www.szicbc.com.cn/promptinfo.html?http://www.szicbc.com.cn/
帮我试改为:10秒跳转,和跳转到http://bbs.bc-cn.net/index.asp
谢谢!
楼主,送你一个.
<HTML>
<HEAD>
<META http-equiv='Content-Type' content='text/html; charset=gb2312'>
<TITLE>打开网页的进度条</TITLE>
</HEAD>
<BODY >
<form name=loading>
<p align=center> <font color="#0066ff" size="2" face="Arial">载入中,请稍等...</font><br>
<input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;">
<br>
<input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;">
<script>
var bar=0
var line="||"
var amount="||"
count()
function count(){
bar=bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99)
{setTimeout("count()",50);}
else
{window.location = "http://bbs.bc-cn.net/index.asp";}
}</script>
</p>
</form>
</BODY></HTML>
[CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
var ss=0;
var t1=20;
function waitmsg(){
var msgstr=document.all.msg.innerHTML;
msgstr+="■";
ss++;
t1--;
if (msgstr.length==30) msgstr=0;
document.all.msg.innerHTML="<nobr>"+msgstr+"</nobr>";
document.all.msg_s.innerHTML="还有"+t1+"秒";
if(t1==0) gotoNext();
}
function gotoNext(){
clearInterval(ts);
var urls= "http://bbs.bc-cn.net/index.asp"
window.location.href(urls);
}
var ts=setInterval("waitmsg()",1000);
//-->
</SCRIPT></HEAD>
<BODY>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left"><span id="msg" style="background-color:#CCCCCC;font-size:12px;width:365;align:left"></span> </td>
<td><span id="msg_s">还有30秒</span> <input type="button" value="立即跳转" onclick="gotoNext()"></td>
</tr>
</table>
</BODY>
</HTML>[/CODE]