基于javascript實(shí)現(xiàn)頁面加載loading效果
更新時間:2020年09月15日 17:08:09 作者:填坑女俠
這篇文章主要為大家詳細(xì)介紹了基于javascript實(shí)現(xiàn)頁面加載loading效果的相關(guān)資料,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
本文實(shí)為大家分享了javascript實(shí)現(xiàn)頁面加載loading效果,供大家參考,具體內(nèi)容如下
效果圖:
<html> <head> <title>正在載入</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"> <table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%"> <tr> <form name=loading> <td align=center> <p><font color=gray>正在載入首頁,請稍候.</font></p> <p> <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:gray; background-color:white; padding:0px; border-style:none;"> <br> <input type=text name=percent size=46 style="font-family:Arial; color:gray; 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()",100);} else {window.location = "目標(biāo)頁";} } </script> </p> </td> </form> </tr> </table> </body> </html>
以上就是本文的全部內(nèi)容,希望對大家學(xué)習(xí)javascript程序設(shè)計有所幫助。
您可能感興趣的文章:
- 為vue-router懶加載時下載js的過程中添加loading提示避免無響應(yīng)問題
- 圖片懶加載imgLazyLoading.js使用詳解
- javascript實(shí)現(xiàn)一個網(wǎng)頁加載進(jìn)度loading
- js實(shí)現(xiàn)的頁面加載完畢之前l(fā)oading提示效果完整示例【附demo源碼下載】
- JS實(shí)現(xiàn)的自定義顯示加載等待圖片插件(loading.gif)
- JavaScript優(yōu)化專題之Loading and Execution加載和運(yùn)行
- js loading加載效果實(shí)現(xiàn)代碼
- javascript自定義加載loading效果
相關(guān)文章
一文總結(jié)JavaScript中常見的設(shè)計模式
在程序設(shè)計中有很多實(shí)用的設(shè)計模式,而其中大部分語言的實(shí)現(xiàn)都是基于“類”。在程序設(shè)計中有很多實(shí)用的設(shè)計模式,而其中大部分語言的實(shí)現(xiàn)都是基于“類”。,本文將總結(jié)了JavaScript中常見的十五種設(shè)計模式,感興趣的朋友可以參考下2023-05-05微信小程序獲取當(dāng)前時間及星期幾的實(shí)例代碼
這篇文章主要給大家介紹了關(guān)于利用微信小程序獲取當(dāng)前時間及星期幾的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-09-09javascript新建標(biāo)簽,判斷鍵盤輸入,以及判斷焦點(diǎn)(示例代碼)
這篇文章主要介紹了javascript新建標(biāo)簽,判斷鍵盤輸入,以及判斷焦點(diǎn)(示例代碼)。需要的朋友可以過來參考下,希望對大家有所幫助2013-11-11