JS之鼠标移上显示,鼠标移开隐藏

淩亂°似流年 2022-07-12 02:46 395阅读 0赞
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>鼠标移上显示,鼠标移开隐藏</title>
  6. <script language="javascript">
  7. function mshow(obj)
  8. {
  9. document.getElementById("sub"+obj.id).style.visibility="visible";
  10. }
  11. function mhidden(obj)
  12. {
  13. document.getElementById("sub"+obj.id).style.visibility="hidden";
  14. }
  15. </script>
  16. </head>
  17. <body>
  18. <div id="menu1" οnmοuseοver="mshow(this);" οnmοuseοut="mhidden(this);">
  19. administrators
  20. </div>
  21. <div id="submenu1" style="visibility:hidden; z-index:100";οnmοuseοver="this.style.visibility='visible'">
  22. <p>111</p>
  23. <p>222</p>
  24. <p>333</p>
  25. </div>
  26. </body>
  27. </html>

发表评论

表情:
评论列表 (有 0 条评论,395人围观)

还没有评论,来说两句吧...

相关阅读