HTMLͼƬÐýת
<html>
<head>
<title> </title>
<script type="text/javascript">
function rotateImage() {
imageToRotate = document.getElementById('imgRotate');
imageToRotate.style.filter= "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')";
window.setTimeout("rotate()",100);
}
var imageToRotate;
var degreeToRotate=0;
function rotate(){
var deg2radians = Math.PI * 2 / 360;
degreeToRotate++;
degreeToRotate=degreeToRotate%360;
rad = degreeToRotate * deg2radians ;
costheta = Math.cos(rad);
sintheta = Math.sin(rad);
imageToRotate.filters.item(0).M11 = costheta;
imageToRotate.filters.item(0).M12 = -sintheta;
imageToRotate.filters.item(0).M21 = sintheta;
imageToRotate.filters.item(0).M22 = costheta;
window.setTimeout("rotate()",100);
}
</script>
</head>
<body onload="rotateImage();">
<br />
<canvas id="canvas" width="800" height="600">
<img id="imgRotate" src="http://www.baidu.com/img/logo-yy.gif" />
</canvas>
</body>
</html>
²»ÓÃJSÔòΪ
<img style="filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.7071,M12=-0.7071,M21=0.7071,M22=0.7071,sizingMethod='auto expand')"
id="imgRotate" src=" http://www.baidu.com/img/logo-yy.gif" />
Ïà¹ØÎĵµ£º
×ªÔØ£ºhttp://jiangzhengjun.javaeye.com/blog/480996
ʼþ
DOMͬʱ֧³ÖÁ½ÖÖʼþģʽ£º²¶»ñÐÍʼþºÍðÅÝÐÍʼþ£¬µ«ÊÇ£¬²¶»ñÐÍʼþÏÈ·¢Éú¡£Á½ÖÖʼþÁ÷»á´¥¼°DOMÖеÄËùÓжÔÏ󣬴Ódocument¶ÔÏó¿ª
ʼ£¬Ò²ÔÚdocument¶ÔÏó½áÊø£¨´ó²¿·Ö¼æÈݱê×¼µÄä¯ÀÀ»á¼ÌÐø½«Ê¼þ²¶»ñ/ðÅÝÑÓÐøÖÁwindow¶ÔÏ󣩣¬DOMÖеÄÔªËØ¶¼»áÁ¬ÐøÊÕµ½Á½´ÎÊ ......
·½Ê½Ò»£º »ò ×÷»»Ðзû
·½Ê½¶þ£ºÖ±½ÓÔÚÔ´ÂëÖÐÇûسµ
¡¾½¨Òé¡¿ ²ÉÓ÷½°¸Ò»¡£
¡¾Ô´Âë¡¿
<a href="#" title="µÚÒ»ÐÐ µÚ¶þÐÐ µÚÈýÐÐ">·½Ê½Ò»£ºÊó±ê·ÅÔÚÎÒÉÏÃæ¿´Ò»ÏÂtitle</a>
<br />
<br />
<a href="#" title="µÚÒ»ÐÐ
µÚ¶þÐÐ
µÚÈýÐÐ">·½Ê½¶þ£ºÊó± ......
·ÃÎʿؼþµÄÖ÷Òª¶ÔÏóÊÇ:document¶ÔÏó¡£·Ö±ð¶ÔÓ¦µ±Ç°ÎĵµËùÓеģ¨×Ó¶ÔÏ󣩸öÈ˹۵㡣²¢ÇÒÒѾÌṩµÄ¼¸¸öÖ÷Òª·½·¨À´·ÃÎʶÔÏó¡£
1. document.getElementById
2. document.getElementsByName
3 &n ......
Êó±êµÄ¶àÖÖÑùʽ...
<P><a href="help.htm" style="cursor:hand">ÊÖ</a>
<a href="help.htm" style="cursor:text">Îı¾</a>
<a href="help.htm" style="cursor:MOVE">Ëĸö·½ÏòµÄ¼ýÍ·</a>
<a href="help.htm" st ......