纯js代码制作的网页时钟
<code class="html"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta content="MSHTML 6.00.6000.16414" name="GENERATOR"> <div style="LEFT: 155px; WIDTH: 400px; ZOOM: 1; POSITION: absolute; TOP: 133px; HEIGHT: 300px"> <div id="bg" style="LEFT: -22px; WIDTH: 150px; ZOOM: 1.5; POSITION: absolute; TOP: -57px; HEIGHT: 150px"> <img src="/static/imghw/default1.png" data-src="http://files.jb51.net/upload/novelty.gif" class="lazy" style="max-width:90%" alt="纯js代码制作的网页时钟" > </div> <div id="h" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; WIDTH: 129px; PADDING-TOP: 5px; POSITION: absolute; HEIGHT: 129px"> <img src="/static/imghw/default1.png" data-src="http://files.jb51.net/upload/novelty_h.gif" class="lazy" style="max-width:90%" alt="纯js代码制作的网页时钟" > </div> <div id="m" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; WIDTH: 129px; PADDING-TOP: 5px; POSITION: absolute; HEIGHT: 129px"> <img src="/static/imghw/default1.png" data-src="http://files.jb51.net/upload/novelty_m.gif" class="lazy" style="max-width:90%" alt="纯js代码制作的网页时钟" > </div> <div id="s" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; WIDTH: 129px; PADDING-TOP: 5px; POSITION: absolute; HEIGHT: 129px"> <img src="/static/imghw/default1.png" data-src="http://files.jb51.net/upload/novelty_s.gif" class="lazy" style="max-width:90%" alt="纯js代码制作的网页时钟" > </div> <div id="dot" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; WIDTH: 129px; PADDING-TOP: 5px; POSITION: absolute; HEIGHT: 129px"> <img src="/static/imghw/default1.png" data-src="http://files.jb51.net/upload/novelty_dot.gif" class="lazy" style="max-width:90%" alt="纯js代码制作的网页时钟" > </div> <div> <script> //oObj input requires that a matrix filter be applied. //deg input defines the requested angle of rotation. var deg2radians = Math.PI * 2 / 360; function MatrixFilter(obj) { if(!obj.filters)return; //alert(obj.filters.item(0)); var Matrix; for(p in obj.filters) { if(p=="DXImageTransform.Microsoft.Matrix")Matrix=obj.filters["DXImageTransform.Microsoft.Matrix"]; } if(!Matrix) { obj.style.filter+="progid:DXImageTransform.Microsoft.Matrix()"; } Matrix=obj.filters["DXImageTransform.Microsoft.Matrix"]; this.equal=function(Matrix2D_x) { if(Matrix2D_x.M11)Matrix.M11 = Matrix2D_x.M11; if(Matrix2D_x.M12)Matrix.M12 = Matrix2D_x.M12; if(Matrix2D_x.M21)Matrix.M21 = Matrix2D_x.M21; if(Matrix2D_x.M22)Matrix.M22 = Matrix2D_x.M22; } if(arguments[1])this.equal(arguments[1]); this.Rotate=function(deg) { rad = deg * deg2radians; costheta = Math.cos(rad); sintheta = Math.sin(rad); var d=new Matrix2D(costheta,-sintheta,sintheta,costheta); this.equal(Matrix2D.Mul(Matrix,d)); } this.RotateTo=function(deg) { rad = deg * deg2radians; costheta = Math.cos(rad); sintheta = Math.sin(rad); var d=new Matrix2D(costheta,-sintheta,sintheta,costheta); this.equal(d); } this.RotateAt=function(deg,sx,sy) { rad = deg * deg2radians; costheta = Math.cos(rad); sintheta = Math.sin(rad); var d=new Matrix2D(costheta,-sintheta,sintheta,costheta); var x=sx-Matrix.Dx; var y=sy-Matrix.Dy; this.MoveTo(x*costheta+y*sintheta-x,-x*sintheta+y*costheta-y); this.equal(Matrix2D.Mul(Matrix,d)); } this.RotateToAt=function(deg,sx,sy) { rad = deg * deg2radians; costheta = Math.cos(rad); sintheta = Math.sin(rad); var d=new Matrix2D(costheta,-sintheta,sintheta,costheta); var x=sx; var y=sy; this.MoveTo(x-(x*costheta-y*sintheta),-(x*sintheta+y*costheta-x)); this.equal(d); } this.MoveTo=function(sx,sy) { Matrix.Dx=sx; Matrix.Dy=sy; } this.toMatrix2D=function() { return new Matrix2D(Matrix.M11,Matrix.M12,Matrix.M21,Matrix.M22); } this.ZoomBy=function(sx,sy) { var d=new Matrix2D(sx,0,0,sy); this.equal(Matrix2D.Mul(Matrix,d)); } this.toString=function() { return ""+Matrix.M11+" "+Matrix.M12+"\n"+Matrix.M21+" "+Matrix.M22+"\n" } //Matrix.SizingMethod='clip to original'; //this.fnSetRotation(30); //alert(Matrix.M11); //alert(obj.filters["DXImageTransform.Microsoft.Matrix"]); } function Matrix2D() { this.M11 = arguments[0]||1; this.M12 = arguments[1]||0; this.M21 = arguments[2]||0; this.M22 = arguments[3]||1; this.Mul_Matrix2D=function(Matrix2D_b) { var r=new Matrix2D(); r=Matrix2D.Mul(this,Matrix2D_b); return r; } this.toString=function() { return ""+this.M11+" "+this.M12+"\n"+this.M21+" "+this.M22+"\n" } } Matrix2D.Mul=function(Matrix2D_a,Matrix2D_b) { var r=new Matrix2D(); r.M11=Matrix2D_a.M11*Matrix2D_b.M11+Matrix2D_a.M12*Matrix2D_b.M21; r.M12=Matrix2D_a.M11*Matrix2D_b.M12+Matrix2D_a.M12*Matrix2D_b.M22; r.M21=Matrix2D_a.M21*Matrix2D_b.M11+Matrix2D_a.M22*Matrix2D_b.M21; r.M22=Matrix2D_a.M21*Matrix2D_b.M12+Matrix2D_a.M22*Matrix2D_b.M22; return r; } var ms=new MatrixFilter(s); var mm=new MatrixFilter(m); var mh=new MatrixFilter(h); var i=1; setInterval("ms.RotateToAt((new Date()).getSeconds()*6+6,69,69)",500); setInterval("mm.RotateToAt((new Date()).getMinutes()*6+6,69,69)",500); setInterval("mh.RotateToAt(((new Date()).getHours()+(new Date()).getMinutes()/60)*30,69,69)",500); //mf.MoveTo(30,70); //mf.ZoomBy(1.5,1.5); //mf.ZoomBy(1.5,1.5); //alert(mf.toMatrix2D()); //alert(Matrix2D.Mul(m2d1,m2d2)); //fnSetRotation(oDiv.filters.item(0),30); </script> </div> </div> </code>
绾

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

您的手機中缺少時鐘應用程式嗎?日期和時間仍將顯示在iPhone的狀態列上。但是,如果沒有時鐘應用程序,您將無法使用世界時鐘、碼錶、鬧鐘等多項功能。因此,修復時鐘應用程式的缺失應該是您的待辦事項清單的首位。這些解決方案可以幫助您解決此問題。修復1–放置時鐘應用程式如果您錯誤地從主畫面中刪除了時鐘應用程序,您可以將時鐘應用程式放回原位。步驟1–解鎖iPhone並開始向左側滑動,直到到達「應用程式庫」頁面。步驟2–接下來,在搜尋框中搜尋「時鐘」。步驟3–當您在搜尋結果中看到下方的「時鐘」時,請按住它並

如何使用WebSocket和JavaScript實現線上語音辨識系統引言:隨著科技的不斷發展,語音辨識技術已成為了人工智慧領域的重要組成部分。而基於WebSocket和JavaScript實現的線上語音辨識系統,具備了低延遲、即時性和跨平台的特點,成為了廣泛應用的解決方案。本文將介紹如何使用WebSocket和JavaScript來實現線上語音辨識系

WebSocket與JavaScript:實現即時監控系統的關鍵技術引言:隨著互聯網技術的快速發展,即時監控系統在各個領域中得到了廣泛的應用。而實現即時監控的關鍵技術之一就是WebSocket與JavaScript的結合使用。本文將介紹WebSocket與JavaScript在即時監控系統中的應用,並給出程式碼範例,詳細解釋其實作原理。一、WebSocket技

如何利用JavaScript和WebSocket實現即時線上點餐系統介紹:隨著網路的普及和技術的進步,越來越多的餐廳開始提供線上點餐服務。為了實現即時線上點餐系統,我們可以利用JavaScript和WebSocket技術。 WebSocket是一種基於TCP協定的全雙工通訊協議,可實現客戶端與伺服器的即時雙向通訊。在即時線上點餐系統中,當使用者選擇菜餚並下訂單

如何使用WebSocket和JavaScript實現線上預約系統在當今數位化的時代,越來越多的業務和服務都需要提供線上預約功能。而實現一個高效、即時的線上預約系統是至關重要的。本文將介紹如何使用WebSocket和JavaScript來實作一個線上預約系統,並提供具體的程式碼範例。一、什麼是WebSocketWebSocket是一種在單一TCP連線上進行全雙工

JavaScript和WebSocket:打造高效的即時天氣預報系統引言:如今,天氣預報的準確性對於日常生活以及決策制定具有重要意義。隨著技術的發展,我們可以透過即時獲取天氣數據來提供更準確可靠的天氣預報。在本文中,我們將學習如何使用JavaScript和WebSocket技術,來建立一個高效的即時天氣預報系統。本文將透過具體的程式碼範例來展示實現的過程。 We

JavaScript教學:如何取得HTTP狀態碼,需要具體程式碼範例前言:在Web開發中,經常會涉及到與伺服器進行資料互動的場景。在與伺服器進行通訊時,我們經常需要取得傳回的HTTP狀態碼來判斷操作是否成功,並根據不同的狀態碼來進行對應的處理。本篇文章將教你如何使用JavaScript來取得HTTP狀態碼,並提供一些實用的程式碼範例。使用XMLHttpRequest

用法:在JavaScript中,insertBefore()方法用於在DOM樹中插入一個新的節點。這個方法需要兩個參數:要插入的新節點和參考節點(即新節點將要插入的位置的節點)。
