<!--- 界面效果做到了 但函數(shù)還是在執(zhí)行中---> <HTML> <HEAD> <script language="javascript"> var secs = 20; //倒計(jì)時(shí)的秒數(shù) var URL ="http://mzsts.host3v.com" ; function Load(){ for(var i=secs;i>=0;i--) { window.setTimeout('doUpdate(' + i + ')', (secs-i) * 1000); } } function doUpdate(num) { if(secs>0) {document.getElementById('ShowDiv').innerHTML = '將在'+num+'秒后自動(dòng)跳轉(zhuǎn)到主頁(yè)' ; if(num == 0) { window.location =URL; } } } function timefun(){ secs =-1; } </script> </HEAD> <body onload="Load()" > <canvas id="myCanvas" width="50px" height="50px" > </canvas> <canvas id="myCanvas2" width="180px" height="50px" > </canvas> <script type="text/javascript"> <!-- 1 --> var canvas = document.getElementById("myCanvas"); if(canvas.getContext){ var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.strokeStyle = "blue"; var circle = { x : 10, y : 40, r : 10 }; ctx.arc(circle.x, circle.y, circle.r, -Math.PI*3/ 4, Math.PI / 2, false); ctx.stroke(); } <!-- 2 --> var canvas = document.getElementById("myCanvas"); if(canvas.getContext){ var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.strokeStyle = "blue"; var circle = { x : 25, y : 26, r : 10 };ctx.arc(circle.x, circle.y, circle.r, -Math.PI/2, Math.PI/4, true); ctx.stroke(); } <!-- 3--> var canvas = document.getElementById("myCanvas"); if(canvas.getContext){ var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.strokeStyle = "red"; var circle = { x : 30, y : 35, r : 10 }; ctx.arc(circle.x, circle.y, circle.r, -Math.PI*3/ 4, Math.PI / 2, false); ctx.stroke(); } <!-- 4 --> var canvas = document.getElementById("myCanvas"); if(canvas.getContext){ var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.strokeStyle = "red"; var circle = { x :45, y : 23, r : 10 };ctx.arc(circle.x, circle.y, circle.r, -Math.PI/2, Math.PI/4, true); ctx.stroke(); } var canvas = document.getElementById("myCanvas2"); if(canvas.getContext){ var ctx = canvas.getContext("2d"); ctx.font = "10px Courier New"; ctx.fillStyle = "blue"; ctx.fillText("文洲 的個(gè)人主頁(yè),彼岸", 10, 20); ctx.fillText("http://mzsts.host3v.com", 10, 40); } </script> <div id="ShowDiv"> </div> </br> <button onclick="timefun()">點(diǎn)擊延時(shí)</button> <button onclick="window.open('http://mzsts.host3v.com')">直接跳轉(zhuǎn)</button> </br> </br> <textarea rows="5" cols="40"> <body onload="Load('http://mzsts.host3v.com')"> <body onload="Load('http:www.baidu.com')"> </textarea> </body> </HTML>
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
當(dāng)前標(biāo)題:小代碼html自己網(wǎng)頁(yè)倒計(jì)時(shí)跳轉(zhuǎn)-創(chuàng)新互聯(lián)
文章URL:http://chinadenli.net/article36/ddgspg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計(jì)、微信公眾號(hào)、外貿(mào)網(wǎng)站建設(shè)、自適應(yīng)網(wǎng)站、用戶體驗(yàn)、App開(kāi)發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容