zoukankan
html css js c++ java
弹出层
<html xmlns="
http://www.w3.org/1999/xhtml
" >
<head runat="server">
<title>弹出层</title>
<script type ="text/javascript" src ="jquery-1.4.2.min.js" ></script>
<script type ="text/javascript" >
$(document).ready(function()
{
//动画速度
var speed=500;
//绑定事件处理
$("#btnShow").click(function(event)
{
//取消事件冒泡
event.stopPropagation();
//设置弹出层的位置
var offset=$(event.target).offset();
$("#divTop").css({top:offset.top+$(event.target).height()+"px",left:offset.left});
$("#divTop").show(speed);
})
//单击空白区域隐藏层
$(document).click(function(event)
{
$("#divTop").hide(speed);
}
)
//单击层隐藏自身
$("#divTop").click(function(event)
{
$("#divTop").hide(speed);
})
}
)
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<br /><br /><br />
<button id ="btnShow">显示提示文字</button>
</div>
<div id ="divTop" style ="background-color:#f0f0f0; border : solid 1px #000000; position :absolute ; display :none ; width :300px ; height :100px">
<div style =" text-align:center "> 弹出层</div>
</div>
</form>
</body>
</html>
查看全文
相关阅读:
请教visiouml活动图中动作状态和状态的区别谢谢 软件工程管理 软件规划版
!!!IT人员迅速提升自我效率的十大方法
如何在Visio的UML活动图中(判断及控制流)添加文字啊????
Convert Standard String to System::String
m_pRecordset遍历记录集之后,m_pRecordsetMoveFirst()为什么会出错
!!! C++/CLI中使用using namespace System::Windows::Forms;+MessageBox报错最重要的是看MSDN 每个函数的使用例子
!!!创建 UML 活动图 Visio Office_com
C#反射之AssemblyCLR/c++可以通过反射调用c#类库
请允许我进入你的世界
以赛庆党日
原文地址:https://www.cnblogs.com/tangself/p/1995367.html
最新文章
C语言编程题
将要离开
禁用myeclipse indexes 及 优化myEclipse 启动速度(转)
js获得页面元素位置
比较两个数a、b的大小,不能使用大于/小于、if、switch,?:等判断语句
堆和栈的区别(转过无数次的文章) .
三道C语言字符串操作的笔试题
堆和栈的区别(转过无数次的文章) .
VIM 101: a quickanddirty guide to our favorite free file editor
为什么GUI永远替代不了Command Line?
热门文章
为什么GUI永远替代不了Command Line?
VIM 101: a quickanddirty guide to our favorite free file editor
三道C语言字符串操作的笔试题
嵌入式C语言编程与AVR技巧(一)——C语言环境访问MCU寄存器
poj2419
poj1254
poj1132
poj1281
poj1454
如何将XML缩进显示? VCMFC HTMLXML
Copyright © 2011-2022 走看看