代码示例:(标识:dhtm_graylink)
<html>
<head>
<style>
img
{
filter:gray()
}
</style>
<script type="text/javascript">
function color()
{
document.getElementById('myImage').style.filter=false
}
function gray()
{
document.getElementById('myImage').style.filter="gray()"
}
</script>
</head>

<body>
<b>请把鼠标移动到图像链接上</b><br />
<a href="/index.php">
<img id="myImage" border="0" src="/static/demo/images/eg_smile.gif" onmouseover="color()" onmouseout="gray()" />
</a>
</body>

</html>
运行结果: