鼠標懸停彈出層

<!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>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title></title>
 <style type="text/css">
 <!--
#box{display:none; width: 300px; height: 180px; background:#345;text-align:center; line-height:180px; color:#fff; }
 -->
 </style>
 <script type="text/javascript" language="javascript" >
 <!--
  function display(){
document.getElementById("box").style.display="block";
  }
  function disappear(){
document.getElementById("box").style.display="none";
  }
 -->
 </script>
 </head>
<body>
<a href="#" οnmοuseοver="display()" οnmοuseοut="disappear()">請把鼠標移到這裏來...</a>
<div id="box" οnmοuseοver="display()" οnmοuseοut="disappear()">這裏可以是圖片,也或以是層</div>
</body>
</html></font>
<a href="http://js.alixixi.com/">歡迎訪問阿里西西網頁特效代碼站,js.alixixi.com</a>

發佈了127 篇原創文章 · 獲贊 6 · 訪問量 14萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章