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和HTM文件在一次杀毒后都变成了可执行文件图标的样式。在网上搜索了若干方法都不得其解。最后查了一下资料,原来是注册表中有个可有可无的键值的存在造成的,这个就是:
HKEY_CLASSES_ROOT\htmlfile\ShellEx\lconHandler
删除lconHandler后,所有HTML和HTM文件都变成了未知文件的样式,还需要再到“控制面板&rdq ......
insertAtCurson 函数代两参数分别为对象和输入的字符
function insertAtCursor(myField, myValue)
{
if (document.selection)
{
&nb ......
<script language="javascript">
function newRow()
{
var tbl = document.all("mytbl");
var row = &nb ......
HTML中实现右键菜单功能
我们使用的应用系统很多都有右键菜单功能。但是在网页上面,点击右键一般显示的却是IE默认的右键菜单,那么我们如何实现自己的右键菜单呢?下面将讲解右键菜单功能的实现原理和实现代码。
实现原理
在HTML语言中,基本上每个对象都有一个oncontextmenu事件,这个事件就是鼠标的右键单击 ......
当HTML控件的id="ctl00_contentPlaceHolder_ddl_academy",name="ctl00$contentPlaceHolder$ddl_academy"时
Request.Form["ctl00$contentPlaceHolder$ddl_academy"]而不是
Request.Form["ctl00_contentPlaceHolder_ddl_academy"] ......