62,046
社区成员
发帖
与我相关
我的任务
分享
<!--ModalDialog-->
<div id="lockwindow" style="display:none;border: medium none; margin: 0pt; padding: 0pt;
z-index:1px; left: 0px; top: 0px; position: absolute;
background-color: rgb(153, 153, 153); background-image: url(images/blank.gif);
filter: alpha(opacity=55); opacity: 0.55857;">
</div>
<!--normal form-->
<div class="PopupBox" id="myForm">
<div class="PopupBoxTop" onmousedown="handleMouseDown(event)">
<div class="PopupBoxTitle"><h1 id="textTitle"></h1></div>
<div class="CloseButton"><a href="#" style="cursor:pointer;" onclick="floatWindowClose()"><h1>关闭</h1></a></div>
</div>
<div class="PopupBoxCenter" id="showWindowContent"></div>
<div class="PopupBoxCenter" id="showWindowFrame">
<iframe allowtransparency="true" id="InsideFrame" style="width: 95%;display:none;" src="" frameborder="0" scrolling="auto"></iframe>
</div>
<div class="PopupBoxBottom"></div>
</div>
<!--normal form end-->
<!--ModalDialog End-->
function showWindow(args)
{
oLockForm.style.display="block";
oMyForm.style.display="block";
oMyForm.style.offsetLeft=(document.documentElement.offsetWidth-width)/2; //居中显示
oMyForm.style.offsetTop=(document.documentElement.offsetHeight-height)/2;
try{
oContent.innerHTML="";
}catch(Execption){}; //清空对象
try{
oFrameDiv.getElementsByTagName("IFRAME")[0].src="";
}catch(ex){};
if(args['title'])
document.getElementById("textTitle").innerHTML=args['title'];
if(args['url'])
{
oContent.style.display="none";
if(args['height'])
{
oFrameDiv.style.height=""+args['height']+"px";
oFrameDiv.getElementsByTagName("IFRAME")[0].style.height=""+args['height']+"px"; //问题出在这里,设置了DIV的高度后,仍然不显示目标页面里的内容(args['url'])
oFrameDiv.getElementsByTagName("IFRAME")[0].style.display="block";
try{ oFrameDiv.getElementsByTagName("IFRAME")[0].src=args['url']; } catch(e2){};
}
}
if(args['html'])
{
oFrameDiv.style.display="none";
oContent.innerHTML=args['html'];
oContent.style.height=""+args['height']+"px"; //这里也出现同上的问题
}
}
oFrameDiv.style.height=""+args['height']+"px";
问题是出在在DIV设置高度时,DIV并没有撑开.就和高度为0时显示的一样,如图: