易截截图软件、单文件、免安装、纯绿色、仅160KB

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" />


相关文档:

通过HTML 注释性语法判断IE版本

Example:
1.<!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->
2.<!--[if IE]> 所有的IE可识别 <![endif]-->
3.<!--[if IE 5.0]> 只有IE5.0可以识别 <![endif]-->
4.<!--[if IE 5]> 仅IE5.0与IE5.5可以识别 <![endif]-->
5.<!--[if gt IE 5.0]> IE ......

HTML 5——下一代web开发标准

HTML 5——下一代web开发标准
HTML5看来将成为主流,浏览器战争乃至整个互联网的发展也将围绕这一点展开。而Flash、Silverlight和JavaFX等等RIA技术,将面临严峻的生存挑战
参考51cto
http://developer.51cto.com/art/200907/133407.htm ......

HTML中实现右键菜单功能

HTML中实现右键菜单功能
我们使用的应用系统很多都有右键菜单功能。但是在网页上面,点击右键一般显示的却是IE默认的右键菜单,那么我们如何实现自己的右键菜单呢?下面将讲解右键菜单功能的实现原理和实现代码。
 
实现原理
在HTML语言中,基本上每个对象都有一个oncontextmenu事件,这个事件就是鼠标的右键单击 ......

Javascript 中对HTML编码和解码的方法

String.prototype.HTMLEncode = function() {
var temp = document.createElement ("div");
(temp.textContent != null) ? (temp.textContent = this) : (temp.innerText = this);
var output = temp.innerHTML;
temp = null;
return output;
}
String.prototype.HTMLDecode = function() {
var temp = doc ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号