javascipt+css 控制图片黑白转彩色

2006-11-15 13:34:17

<SCRIPT> function doTrans(filterCode) { imgObj.filters[0].apply(); oImg.style.filter = filterCode imgObj.filters[0].play(); } </SCRIPT> <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="http://www.shareme.cn/blog/images/blog_logo.gif"> </SPAN>