建立 css.css文件
#massage_box{ position:absolute; left:e-xpression((body.clientWidth-300)/2); top:e-
xpression((body.clientHeight-200)/2); width:170px; height:50px;filter:dropshadow
(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden}
#mask{ position:absolute; top:0; left:0; width:e-xpression(body.scrollWidth); height:e-
xpression(body.scrollHeight); background:#666; filter:ALPHA(opacity=60); z-index:1;
visibility:hidden}
#massage_box_1{ position:absolute; left:350px; top:e-
xpression((body.clientHeight-200)/2); width:290px; height:180px;filter:dropshadow
(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden}
#massage_box1{ position:absolute; left:350px; top:e-
xpression((body.clientHeight-200)/2); width:290px; height:180px;filter:dropshadow
(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden}
#mask1{ position:absolute; top:0; left:0; width:e-xpression(body.scrollWidth); height:e-
xpression(body.scrollHeight); background:#666; filter:ALPHA(opacity=60); z-index:1;
visibility:hidden}
#mask_1{ position:absolute; top:0; left:0; width:e-xpression(body.scrollWidth); height:e-
xpression(body.scrollHeight); background:#666; filter:ALPHA(opacity=60); z-index:1;
visibility:hidden}
#mask_2{ position:absolute; top:0; left:0; width:e-xpression(body.scrollWidth); height:e-
xpression(body.scrollHeight); background:#666; filter:ALPHA(opacity=60); z-index:1;
visibility:hidden}
#massage_box2{ position:absolute; left:240px; top:300px; width:290px; height:180px;filter:dropshadow
(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden}
#massage_box_2{ position:absolute; left:240px; top:300px; width:290px; height:180px;filter:dropshadow
(color=#666666,offx=3,offy=3,positive=2); z-index:2; visibility:hidden}
#mask2{ position:absolute; top:0; left:0; width:e-xpression(body.scrollWidth); height:e-
xpression(body.scrollHeight); background:#666; filter:ALPHA(opacity=60); z-index:1;
visibility:hidden}
.massage{border:#036 solid; border-width:1 1 3 1; width:95%; height:95%; background:#fff;
color:#036; font-size:12px; line-height:150%}
.header{background:#036; height:20px; font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px; padding:3 5 0 5; color:#fff}
dept.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>龙汇网络运维管理系统</title>
<script type="text/javascript" >
function gotoUrl(u)
{
window.location=u;
}
function addbaseequipent()
{
size1(300,200,'MyJsp.html','添加设备信息');
}
</script>
<link rel="StyleSheet" href="css.css" type="text/css" />
<script language="javascript">
var Obj=''
document.onmouseup=MUp
document.onmousemove=MMove
function MDown(Object){
Obj=Object.id
document.all(Obj).setCapture()
pX=event.x-document.all(Obj).style.pixelLeft;
pY=event.y-document.all(Obj).style.pixelTop;
}
function MMove(){
if(Obj!=''){
if(event.y-pY<=0)
{
document.all(Obj).style.top=0;
}else{
document.all(Obj).style.left=event.x-pX;
document.all(Obj).style.top=event.y-pY;
}
}
}
function MUp(){
if(Obj!=''){
document.all(Obj).releaseCapture();
Obj='';
}
}
function size1(width,height,url,title){
dd=document.getElementById("massage_box_2");
hh=document.getElementById("header1_2");
ti=document.getElementById("title_2");
//重新设置宽度
dd.style.width=width+"px";
hh.style.width=width+"px";
//重新设置高度
dd.style.height=height+"px";
//设置位置
dd.style.left = (document.body.offsetWidth - width)/2+"px";
dd.style.top = (document.body.offsetHeight - height)/2+"px";
//ti.innerText=title;
ti.innerHTML=title;
dd.style.visibility='visible';
document.getElementById("content_2").innerHTML="<iframe id=fifremid_2 width="+width+" height="+height+" >";
document.getElementById("fifremid_2").src=url;
}
</script>
</head>
<body>
<div id="massage_box_2" style="width:300px; height:200px;">
<div id="massage">
<div id="header1_2" class="header" onmousedown=MDown(massage_box_2)>
<div id="title_2" style="display:inline; width:250px;position:absolute;padding-left: 10px;"></div>
<span onClick="massage_box_2.style.visibility='hidden'" style="float:right; display:inline; cursor:hand">× </span>
</div>
<div id="content_2"></div>
</div>
</div>
<button style="width=100px" onClick="addbaseequipent();" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'" onMouseOut="this.className='btn1_mouseout'" title="添加信息">添加设备</button>
。。。。。。。。。。。。。。
</body>
</html>
myjsp.jsp
<html>
<head>
<title>My JSP 'MyJsp.jsp' starting page</title>
</head>
<script type="text/javascript">
function close1()
{
window.parent.document.getElementById("massage_box_2").style.visibility='hidden';
}
</script>
<body>
This is my JSP page. <br>
<form action="xxxx.jsp" onSubmit="return close1()" >
<input name="" type=text />
<input type="submit" value="xxx">
</form>
</body>
</html>
所有代码都再这里了,大家多多指教!