遮罩层提示框,可拖动标题栏(兼容FF)
来源:互联网 发布:淘宝评价怎么写50字 编辑:程序博客网 时间:2024/06/05 19:32
<!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>
<script type="text/javascript">
function showFilter() {
document.getElementById('filter').style.display = 'inline';
document.getElementById('promptbox').style.display = 'inline';
}
function hidFilter() {
document.getElementById('filter').style.display = 'none';
document.getElementById('promptbox').style.display = 'none';
}
var Mouse_Obj = "none", _x, _y;
document.onmousemove=function(e) {
if (Mouse_Obj != "none") {
e = e ? e : window.event;
var obj = document.getElementById(Mouse_Obj);
obj.style.left = _x + e.clientX + "px";
obj.style.top = _y + e.clientY + "px";
event.returnValue = false;
}
}
document.onmouseup= function() {
Mouse_Obj = "none";
}
function m(o, e) {
e = e ? e : window.event;
Mouse_Obj = o;
var obj=document.getElementById(Mouse_Obj);
_x = obj.offsetLeft + 190; //这里的190是下面 margin-left:-190px 的偏移值
_y = obj.offsetTop + 80; //这里的80是下面 margin-top:-80px; 的偏移值
_x += -e.clientX;
_y += -e.clientY;
}
</script>
<style type="text/css">
body
{
font-size: 9pt;
font-family: 宋体;
}
#filter{display:none; position:absolute;bottom:0px;right:0px; left:0px; top:0px; z-index:1000;background: #000000;filter:Alpha(opacity=30);opacity:0.3}
#promptbox{display:none; left:50%;top:50%;margin-left:-190px;margin-top:-80px; width: 380px; z-index: 1001;
position: absolute; text-align: center; background-color: White; border:solid 1px #000; padding:0 0 10px}
.lefttit{ margin-left:20px; width:60px}
</style>
</head>
<body>
<a onclick="showFilter();" href="#">上传图片</a>
<div id="filter">
</div>
<div id="promptbox" >
<div onmousedown="m('promptbox',event)" style="height: 24px; margin-bottom:20px; background-color: Blue; ">
<span onclick="hidFilter()" style="float: right; height: 24px; line-height:24px; background-color: Red;
font-size: 20px; font-weight: bolder; color: White; cursor:pointer;">×</span></div>
<div style=" text-align:left">
<span class="lefttit">
本地文件:</span><input type="file" style="width:280px" size="30" runat="server" id="oFile" /></div>
<div style="margin:20px 0; text-align:left">
<span class="lefttit">
图片标题:</span><input type="text" runat="server" id="txtNewImgName" size="40" /></div><div style="text-align: center;">
<input type="button" onclick="hidFilter()" value="取消" />
<input id="Button1" type="button" onclick="if(document.getElementById('oFile').value==''){alert('请选择本地文件!');return false;}if(document.getElementById('txtNewImgName').value==''){alert('请输入图片标题');return false;}"
value="上传" runat="server" onserverclick="Upfile_Click" /></div>
</div>
</body></html>
转载请注明出处:http://blog.csdn.net/dasihg/article/details/6796755- 遮罩层提示框,可拖动标题栏(兼容FF)
- JS控制的可拖动层代码(兼容IE,FF)
- Js版Windows窗口模拟,兼容FF火狐,可拖动,可改变大小
- 可拖动DIV提示框
- 比较常见的拖动层代码。(兼容FF)
- 续:比较常见的拖动层代码。(兼容FF)
- 拖动层效果,兼容IE和FF!
- IE和FF兼容之DIV拖动
- 兼容IE、FF 的屏幕居中div提示信息框
- vb6中无标题栏窗口的拖动(非API可指定标题栏高度)
- 发一个背景变暗的div可拖动提示窗口,兼容IE、Firefox、Opera
- 一个背景变暗的div可拖动提示窗口,兼容IE、Firefox、Opera
- 背景变暗的div可拖动提示窗口,兼容IE、Firefox、Opera
- 一个背景变暗的div可拖动提示窗口,兼容IE、Firefox、Opera
- JavaScript实现弹出遮盖拖动层(不穿过浏览器边缘,兼容IE、FF)
- QWidget无边框无标题栏窗体 可拖动可拉伸
- javascript实现可以拖动的层示例(层拖动,兼容IE/FF)
- vb.net实现无标题栏窗体可拖动
- 静态库动态库的配置使用
- jquery.validate 客户端验证“必填”“URL”“最小最小长度”“最大最小值”“数字”“身份证”“信用卡”“邮编”等
- 2011-09-21
- 人物属性影响技能效果强度的相关分析
- linux下JDK安装,不同用户不同SHELL下环境变量设置
- 遮罩层提示框,可拖动标题栏(兼容FF)
- redfire from google
- Subversion 错误信息一览表
- C++学习笔记
- 小议如何改变指针的指向
- 关于GMT+8的含义
- 用svnsync 同步备份 svn 版本库 从一台服务器到令一台服务器
- 数据结构各种算法实现C++
- Html和Xml中注释符