<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
 <title>hover</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<script src="jquery-1.2.6.js" language="JavaScript" type="text/javascript"></script>
<script>
<!--
 $(document).ready(function(){
  $("img").hover(function(){
   $(document.body).append($("<div id='color'>google</div>"));
  },function(){
    $(document.body).find("div:last").remove();
  }
  
  )
 })
--> 
</script>
<style>
<!--
 img{ margin:50px auto;}
 #color{ background:#f00; width:150px;height:100px; position:absolute; top:10px; }
-->
</style>
<body>
<img src="http://www.google.cn/intl/zh-CN/images/logo_cn.gif" />
</body>
</html>

 posted on 2008-09-08 16:07  刘卿  阅读(2680)  评论(1编辑  收藏  举报