试试:
var oIframe = document.createElement('iframe');
oIframe.src=url;
oIframe.height='100%';
oIframe.width='100%';
winBody.appendChild(oIframe);

解决方案 »

  1.   

    这与asp.net控制系统没有关系。可以到 html/css 论坛问问。
      

  2.   

    你用 document.write 方法呢?
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <style type="text/css">
    html,body { height:100%;margin:Auto }
    </style>
    </head>
    <body>
    <script type="text/javascript">
    title = "title"
    MAX_Z_INDEX = 100
    width = height = 600
    var url = "http://www.google.com/"
    var winPanel=document.createElement("div");
    var winBody=document.createElement("div");
    var winBar=document.createElement("div");
    winBar.innerHTML="<table width='100%'  border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >"+
    "<tr>"+
    "<td bgcolor=\"#0000FF\" height='25' >&nbsp;&nbsp;</td>"+
    "<td width=\"100%\" bgcolor=\"#0000FF\"><strong>"+title+"</strong></td>"+
    "<td bgcolor=\"#0000FF\" width='20'><img src=\"../images/publish_x.png\" id=\"flow_close\" title='close'>&nbsp;&nbsp;</td>"+
    "</tr>"+
    "</table>";
    winBody.innerHTML="<iframe src='"+url+"' width=\"100%\" height=\"100%\" ></iframe>";//-----------就这一句...刷新一下才会显示...很晕啊..请高人指点
    winPanel.insertAdjacentElement("beforeEnd",winBody);
    winBody.insertAdjacentElement("afterBegin",winBar);
    winPanel.style.position = "absolute";
    winPanel.style.zIndex = MAX_Z_INDEX;
    winPanel.style.width=width;
    winPanel.style.height=height;
    winPanel.style.top = (document.body.offsetHeight-500)/2 + document.body.scrollTop; 
    winPanel.style.left =(document.body.offsetWidth-400)/2;
    document.body.appendChild(winPanel);
    </script>
    </body>
    </html>
      

  4.   

    Click the link to solve your problem.Good luck!