This article describes the method of sensing the transparency changes of mouse images by JS. Share it for your reference. The specific implementation method is as follows:
Copy the code as follows: <html>
<head>
<title>Sensing the transparency of mouse image</title>
<SCRIPT language="JavaScript">
<!--
function makevisible(cur, which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=20
}
//-->
</SCRIPT>
</head>
<body>
Put the mouse on the picture to see the effect!<br>
<img src="/images/skinslogo.gif" style="filter:alpha(opacity=20)" onMouseOver="makevisible(this,0)" onMouseOut="makevisible(this,1)">
</body>
</html>
I hope this article will be helpful to everyone's JavaScript programming.