這個loading 需要2個頁面的的支持,還可以為一個站點(diǎn)的所有html設(shè)置這個loading程序
<!--=================================-->
<!-- index.htm--->
<!--=================================-->
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("
" + ButtonValue + " |
function wtdiv()
{
document.write("
系統(tǒng)正在運(yùn)行中,請耐心等待. 等待時間:秒 |
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();
<!--=================================-->
<!-- h.js -->
<!--=================================-->
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首頁里加入如下代碼就可以
分享標(biāo)題:真正的用JS做的loading(轉(zhuǎn))
本文路徑:http://www.rwnh.cn/article10/jjsigo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站、商城網(wǎng)站、面包屑導(dǎo)航、、靜態(tài)網(wǎng)站、品牌網(wǎng)站制作
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)