易截截图软件、单文件、免安装、纯绿色、仅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重新加载问题

   最近在使用ext嵌入html页面的过程中,遇到一个问题。我们页面都是用html制作的,用iframe的方式嵌入到ext的panel里。其中有一个页面是在按钮触发的时候加载进去的,但是重新刷新浏览器,页面仍然嵌入在panel中,并没有卸载掉,在页面上设置清空缓存也没有效果。
   后来我发现,只有在浏览器地址里 ......

html增行

<script   language="javascript">  
  function   newRow()  
  {  
    var   tbl   =   document.all("mytbl");  
    var   row   = &nb ......

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 ......

解决json包含html标签无法显示的问题

主要是将json无法识别的字符进行转义   
function dotran($str) {
        $str = str_replace('"','\\"',$str);
        $str = str_replace("\r\n",'\\r\\n',$str);
        $str = str_ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号