真正的 用JS 做的 loading (转)

真正的 用JS 做的 loading (转)[@more@]

这个loading 需要2个页面的的支持,还可以为一个站点的所有html设置这个loading程序
<!--=================================--&gt
<!-- index.htm---&gt
<!--=================================--&gt



您正在访问 .NET">http://m9m.nease.net 的网站......

RM border=0>
 
 


您的 浏览器不支持frames......


<!--=================================--&gt
<!-- loading.htm---&gt
<!--=================================--&gt







<!--=================================--&gt
<!-- to. js --&gt
<!--=================================--&gt
document.write('');

function WriteButton(fnFunctionName, ButtonValue, ButtonURL, wd)
{
  var strTmp = "",n = 0;
  if (fnFunctionName == "")
  strTmp = "self.location = '" + ButtonURL + "';";
 else
  strTmp = fnFunctionName + '();';
 for(var i = 0; i < ButtonValue.length; i++)
 {
  var c = ButtonValue.substr(i, 1);
  if( c > "z" || c < "A")
  n += 2;
  else
  n += 1;
 }
 if( wd == "") wd = (n * 8);

 document.write("

Javascript:this.className='btu'" οnmοusedοwn="Javascript:this.className='btd'" οnmοuseοver="javascript:this.className='btu'" style="FONT-SIZE:12px;TEXT-DECORATION:none" οnclick="javascript:this.className='btd';" + strTmp + "" οnmοuseοut="javascript:this.className='btn'">" + ButtonValue + "
");
}

function wtdiv()
{
  document.write("


系统正在运行中,请耐心等待.
等待时间:
");
}
wtdiv();

function openwin()
{
  if(self == window.parent.frames['t'] && top.parent.frm)
 top.parent.frm.rows = '*,0';
  else if(top.parent.frm) top.parent.frm.rows = '0,*';
}

var wt = 0, n = 0;
function countwt()
{
  if (wt)
  clearTimeout(wt);
  wtime.innerHTML = "" + n++ ;
  wt = setTimeout("countwt();", 1000);
}


function showdiv()
{
  openwin();
 document.getElementById("stdiv").style.visibility = "visible";
  countwt();
}
openwin();

<!--=================================--&gt
<!--  h.js --&gt
<!--=================================--&gt
if(self != window.parent.frames['t'] && window.parent.frames['t'])
  window.parent.frames['t'].showdiv();
else if(self == window.parent.frames['d'] && window.parent.frames['d'])
  window.parent.frames['d'].showdiv();

最后的说明
在您的i.htm,也就是您的真正的index.htm首页里加入如下代码就可以

后加

前加入

就可以了

不明白的可以访问我的网站 http://m9m.nease.net 或 来信和我交流
qq: 11602011

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752019/viewspace-981645/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10752019/viewspace-981645/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值