W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<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>Mouse over the image</b><br /> <img id="myImage" src="/i/eg_landscape.jpg" onmouseover="color()" onmouseout="gray()" /> </body> </html>