java怎么点击跳出设计的窗口_遮罩层形式的弹出窗口页面

//显示层样例代码

function callshowmaskExample(popsrcstr){

//弹出层 赋src

var popdivframe=document.getElementById('pop_div_tabs_frame');

if(popdivframe){

popdivframe.src="/jsp/homepage/newOASMS.jsp";

var fade_height= window.document.body.clientHeight;//遮照高度

var div_height=250;//当前pop 高度,宽度

var div_width=390;

// var subframe=document.frames('south2_frame');//隐藏下方select

showmask(fade_height,div_width,div_height,null,220,460);

}//if

}

//callshowmaskExample("/jsp/homepage/newOASMS.jsp");

-------------------------------------------------

//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>弹出层 begin<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

var subframe;

/*显示层

*@paraHeight:遮照的高度,默认为首页屏幕高度

*@div_width:显示的div宽度,默认宽:350

*@div_height:显示的div高度,默认200

*@subframeobj:子页面iframe对象

*@div_top:显示的div的上方高度.2008-10-24加入

*@div_left:显示的div的左边宽度.2008-10-24加入

*/

function showmask(paraHeight,div_width,div_height,subframeobj,div_top,div_left){

var t_light=document.getElementById('light');//显示层

var closeButton=document.getElementById('closeButton');//关闭按钮

var t_fade=document.getElementById('fade');//遮挡背景

//var sels = document.getElementsByTagName("select");//当前页面下拉框

if (paraHeight>t_fade.style.height)  t_fade.style.height=paraHeight;

if(div_width>350){

t_light.style.width=div_width;

t_light.style.height=div_height;

}

t_fade.style.display='block';

t_light.style.display='block';

closeButton.style.display='block';

//层定位

t_light.style.left=(document.body.clientWidth/2) - (t_light.offsetWidth/2);

t_light.style.top=(document.body.clientHeight/2) - (t_light.offsetHeight/2);

if(div_top&&div_top!=null)  t_light.style.top=parseInt(div_top);

if(div_left&&div_left!=null) t_light.style.left=parseInt(div_left);

closeButton.style.left=parseInt(t_light.style.left)+parseInt(t_light.offsetWidth)-10;

closeButton.style.top=parseInt(t_light.style.top)-10;

//增加loading效果,调用page_load.js

//divAddLoad(parseInt(t_light.style.left)+10,parseInt(t_light.style.top)+10,parseInt(div_width)-20,parseInt(div_height)-20);

//获取层中iframe

var pop_div_tabs_frame = document.getElementById("pop_div_tabs_frame");

pop_div_tabs_frame.style.visibility="hidden";

//判断iframe状态

pop_div_tabs_frame.onreadystatechange=function(){fnStartInit(this)};

//隐藏当前页面下拉框隐藏

//for(var i=0; i

//    sels[i].style.visibility = "hidden";

//}

//隐藏子页面下拉框

subframe=subframeobj;

if(subframe){

var subselectobj =subframe.document.getElementsByTagName("select");

for(var i=0; i

subselectobj[i].style.visibility = "hidden";

}

}

}

//iframe状态判断

function   fnStartInit(obj)

{

if(obj.readyState == "complete"){

//  divRemoveLoad();

obj.style.visibility="visible";

return;

}

}

/*

*关闭层

*/

function hidemask(){

document.getElementById('light').style.display='none';

closeButton.style.display='none';

document.getElementById('fade').style.display='none';

if(subframe){

//将下拉框显示

var subselectobj = subframe.document.getElementsByTagName("select");

for(var i=0; i

subselectobj[i].style.visibility = "visible";

}

divRemoveLoad();//去掉遮照

}

}

//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>弹出层 结束<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

posted on 2008-12-20 14:19 李云泽 阅读(2359) 评论(0)  编辑  收藏 所属分类: javascript

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值