<!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" />
<style>
 #msg{ background-color:#900; width:200px; height:200px; position:absolute; margin:-100px 0 0 -100px; top:50%; left:50%; display:none;}
</style>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" >
 function showMsg(){
  $("<div id='msg'></div>").appendTo("body");
  $("#msg").fadeIn("fast",function(){
   window.setTimeout(function(){
     $("#msg").fadeOut("fast",function(){
      $("#msg").remove();
     })       
   },3000)        
  })
  
 }
</script>
<title>无标题文档</title>
</head>

<body>
<input type="button" onclick="showMsg()" value="显示" />

</body>
</html>

相关文章:

  • 2022-12-23
  • 2022-02-06
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
猜你喜欢
  • 2021-10-08
  • 2021-12-04
  • 2021-09-01
  • 2022-12-23
  • 2022-12-28
  • 2021-09-12
相关资源
相似解决方案