190、图像由黑白变彩色

190、图像由黑白变彩色 

1

把如下代码复制到<head></head>之间

 

<SCRIPT>

function doTrans(filterCode)

{

imgObj.filters[0].apply();

oImg.style.filter = filterCode

imgObj.filters[0].play();

}

</SCRIPT>

 

 

2把如下代码复制到<body></body>之间

 

<p><SPAN id=imgObj onmouseleave='doTrans("gray")' style="FILTER: progid:DXImageTransform.Microsoft.Fade(Overlap=1.00); WIDTH: 1px" onmouseenter='doTrans("")'><IMG id=oImg style="FILTER: gray" src="pic/wallpaper.jpg"> </SPAN></p>

 

Write a comment

Comments: 0