<!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=gb2312">
<title>浮动窗口 </title>
<script type="text/javascript" src="C:\Users\Administrator.lcf-PC\Desktop\新建文件夹\jquery-1.3.2.js">
</script>
<script type="text/javascript">
function showWin(){
var windowNode=$("#win");
//让div对应的窗口显示出来
//windowNode.css("display","block");
//windowNode.show("slow");
windowNode.fadeIn(3000);
}
function hide(){
var windowNode=$("#win");
// windowNode.hide(3000);
//windowNode.css("display","none");
windowNode.fadeOut("slow");
}
</script>
</head>
<body>
<form>
<a href="#" οnclick="showWin()">显示浮动窗口</a><div>
<div id="win" style="display:none; border:1px red solid;width:200px;
height:150px;position:absolute;top:100px;left:150px;" >
<div id="title" style="color:yellow;padding-left:80px;">标题
<span id="close" style="margin-left:68px;cursor:pointer" οnclick="hide()">X</span>
</div>
<div style="padding-left:10px;padding-top:5px; ">我是浮动窗口</div>
</div>
</form>
</body>
</html>
转载于:https://blog.51cto.com/liu19890121/1149301