javascript弹出图片,背景变暗
来源:互联网 发布:mac软件怎么退出 编辑:程序博客网 时间:2024/04/29 13:28
JS文件:
<script language="javascript" type="text/javascript">
function zC(url){
var picurl="../"+url;
var cWidth,cHeight;
cWidth = screen.width;
cHeight = screen.height;
var cObj = document.createElement("div");
cObj.setAttribute("id","cdiv");
cObj.style.position = "absolute";
cObj.style.top = 0;
cObj.style.left = 0;
cObj.style.backgroundColor = "#CCCCCC";
cObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
cObj.style.width = cWidth +"px";
cObj.style.height = cHeight + "px";
cObj.style.zIndex = "1000";
document.body.appendChild(cObj);
var iObj = document.createElement("img");
iObj.setAttribute("id","cimg");
iObj.style.position = "absolute";
iObj.style.top = "50%";
iObj.style.left = "50%";
iObj.style.width = "500px";
iObj.style.height ="400px";
iObj.style.marginLeft = "-220px" ;
iObj.style.marginTop = -155+"px";
iObj.style.textAlign = "center";
iObj.src = picurl;
iObj.style.zIndex = "1001";
iObj.style.cursor = "hand";
iObj.onclick = function(){
document.body.removeChild(iObj);
document.body.removeChild(cObj);
}
document.body.appendChild(iObj);
}
</script>
服务器控件:
<img src='<%#Eval("picUrl") %>' onclick='zC("<%#Eval("picUrl") %>")' style="cursor:hand; width:20PX; height:20px;" />
- javascript弹出图片,背景变暗
- 弹出popupwindow背景变暗
- 弹出popwindow 背景变暗
- 弹出PopWindow背景变暗
- JavaScript实现背景变暗,弹出提示层(类似关机效果)
- 弹出层效果,背景变暗
- 背景变暗,弹出提示层
- 背景变暗弹出消息框
- 弹出层,背景变暗,禁用滚动条
- 如何弹出窗口并使背景变暗
- 点击弹出层,并且背景变暗
- 点击弹出窗口,并且背景变暗渐变
- JS居中弹出div,背景变暗
- Jquery弹出层,背景变暗 居中
- 弹出层,背景变暗,禁用滚动条
- 弹出对话框,背景颜色逐渐变暗!
- popupwindow弹出,父类背景变暗问题
- DialogFragment弹出后Activity背景不变暗
- 源码在手,了无秘密
- struts 2 标签之s:tree和s:treenode简单实例
- MSSQL查找进程造成死锁_把这个进程杀掉
- WinForm控件开发总结(六)-----控件属性类型转换器代码详解
- MD5的32位16位加密解密代码
- javascript弹出图片,背景变暗
- 查找父串中是否包含字串 11月16日
- OV9650拍照 (转贴gooogleman)
- struts2+spring2+hibernate3整合SiteMesh
- IT关注的趋势汇总,IT业部分热门词语解析
- DB2全文索引—CONTAINS语法
- 告别ASP.NET操作EXCEL的烦恼(总结篇)
- 含字母、数字的Servlet图形验证码
- 有关.ini文件的读写