源碼如下,如遇調試問題,可以找我解決: JS查看示例圖(滑鼠移動顯示,移開隱藏) 點我查看示例 ... ...
源碼如下,如遇調試問題,可以找我解決:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>JS查看示例圖(滑鼠移動顯示,移開隱藏)</title> <script type="text/javascript"> function over(){ img = document.getElementById("Example"); img.style.display = "block"; } function out(){ img = document.getElementById("Example"); img.style.display = "none"; } </script> </head> <body> <form id="form1" runat="server"> <div id="right" align="left"> <table style="TABLE-LAYOUT: fixed; WIDTH: 593pt; BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="0" width="860" border="1"> <tr> <td colSpan="4" id="ExamplePhoto" align="center"> <p onmouseover="over()" onmouseout = "out()"><span style="font-weight:bold;color:Red;text-decoration:underline;">點我查看示例</span></p> <img src="../Img/LoginPhoto.jpg" id="Example" width="750" height="250"/> </td> </tr> </table> </div> </form> </body> </html>示例圖如下,當滑鼠移動時顯示: 當滑鼠移開時,自動隱藏圖片: