濮阳杆衣贸易有限公司

主頁 > 知識庫 > 通用彈出層頁面(兼容IE、firefox)可關閉控制寬高及屏蔽背景

通用彈出層頁面(兼容IE、firefox)可關閉控制寬高及屏蔽背景

熱門標簽:地圖標注專業(yè)和非專業(yè) 甘肅銷售電銷機器人公司 汝南縣地圖標注app 智能電話機器人銷售話術 湖北地圖標注公司 福建電銷貓機器人收費 四川正規(guī)外呼系統(tǒng)軟件 外呼直播語音系統(tǒng) 山東ai外呼電銷機器人好用嗎
%...@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
%.../*
通用彈出層頁面(兼容IE、firefox)
說明:
1.openWindows(width,height)----打開彈出層調用的函數(shù),可控制層的寬度和高度
2.hiddenWindows()----關閉彈出層調用函數(shù)
3._displaySelect()----隱藏下拉框標簽,因為它的優(yōu)先度太高
4.div id="LockWindows">----用于實現(xiàn)屏蔽彈出層以下的頁面
5.div id="WindowDIV">----用于顯示彈出層的內容
例子(空格自己去掉):
在需要彈出層的頁面引用 %@ include file="../common/common_openWindows.jsp"% >
input type="button" onclick="openWindows('800','700');" value="編輯" / >
input type="button" onclick="hiddenWindows();" value="關閉" / >
*/%>
復制代碼 代碼如下:

style type="text/css">...
#LockWindows{...}{
position:absolute; top:10px; left:10px; background-color:#777777; z-index:2; display:none;
/**//* Moz Family使用私有屬性-moz-opacity: 0.70 */
/**//* IE 使用私有屬性filter */
/**//* 標準屬性opacity支持CSS3的瀏覽器(FF 1.5也支持)*/
opacity: 0.70;
filter : progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=70,finishOpacity=100);
width:expression(documentElement.clientWidth 900?(documentElement.clientWidth==0?(body.clientWidth900?'900':'auto'):'900px'):'auto');
}
#WindowDIV{...}{position:absolute; z-index:3; background-color:#FFFFFF; border:#000000 solid 1px; display:none;}
/style>

script type="text/javascript">...
//隱藏下拉框,以解決下拉框優(yōu)先度太高的問題,
復制代碼 代碼如下:

function _displaySelect()...{
var selects=document.getElementsByTagName("select");//整個頁面的所有下拉框
var objWindow = $("WindowDIV");
var DIVselects = objWindow.getElementsByTagName("select");//整個彈出層的所有下拉框
for(var i=0;iselects.length;i++)...{
if(selects[i].style.visibility)...{
selects[i].style.visibility="";
}else...{
selects[i].style.visibility="hidden";
for(var j=0; iDIVselects.length; j++)...{
DIVselects[j].style.visibility="";
}
}
}
}
function openWindows(width,height)...{
var objWindow = $("WindowDIV");
var objLock = $("LockWindows");//這個是用于在IE下屏蔽內容用
objLock.style.display="block";
objLock.style.width=document.body.clientWidth+"px";
objLock.style.height=document.body.clientHeight+"px";
objLock.style.minWidth=document.body.clientWidth+"px";
objLock.style.minHeight=document.body.clientHeight+"px";
// 判斷輸入的寬度和高度是否大于當前瀏覽器的寬度和高度
if(width>document.body.clientWidth) width = document.body.clientWidth+"px";
if(height>document.body.clientHeight) height = document.body.clientHeight+"px";
objWindow.style.display='block';
objWindow.style.width = width+"px";
objWindow.style.height = height+"px";
// 將彈出層居中
objWindow.style.left=(document.body.offsetWidth-width)/2+"px";
objWindow.style.top=(document.body.offsetHeight-height)/2+"px";
_displaySelect();
}
function hiddenWindows()...{
$("LockWindows").style.display='none';
$("WindowDIV").style.display='none';
_displaySelect();
}
/script>
div id="LockWindows">nbsp;/div>
div id="WindowDIV">
%...@ include file="../examination/openEditerDiv.jsp"%>
/div>
您可能感興趣的文章:
  • 漂亮的jquery提示效果(仿騰訊彈出層)
  • js寫一個彈出層并鎖屏效果實現(xiàn)代碼
  • div彈出層的ajax登錄(Jquery版+c#)
  • js 彈出層 并可以拖拽
  • 基于jquery的blockui插件顯示彈出層
  • jquery使用ColorBox彈出圖片組瀏覽層實例演示

標簽:吳忠 臨沂 南充 梅州 昌都 肇慶 黔東 白銀

巨人網絡通訊聲明:本文標題《通用彈出層頁面(兼容IE、firefox)可關閉控制寬高及屏蔽背景》,本文關鍵詞  通用,彈出,層,頁面,兼容,;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《通用彈出層頁面(兼容IE、firefox)可關閉控制寬高及屏蔽背景》相關的同類信息!
  • 本頁收集關于通用彈出層頁面(兼容IE、firefox)可關閉控制寬高及屏蔽背景的相關信息資訊供網民參考!
  • 推薦文章
    佛学| 大丰市| 大渡口区| 循化| 德州市| 民丰县| 西安市| 宣恩县| 天津市| 黄冈市| 眉山市| 黄梅县| 满洲里市| 昌都县| 宁津县| 视频| 故城县| 上栗县| 平乐县| 大安市| 安平县| 武定县| 南皮县| 阿合奇县| 孟州市| 武冈市| 大石桥市| 舞阳县| 南投县| 哈巴河县| 体育| 巫山县| 安仁县| 台北市| 马山县| 宜宾市| 颍上县| 泾川县| 秦安县| 晴隆县| 银川市|