现在的位置: 首页 > 综合 > 正文

jquery-title提示

2012年10月22日 ⁄ 综合 ⁄ 共 661字 ⁄ 字号 评论关闭

<!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>

抱歉!评论已关闭.