我在IFrame的页面用
<input id= "quxiaoBtn" type ="button" value = "取消" class ="btn_4" onclick = "javascript:window.Close();location=location;"/>
但是关不了这个iframe.只是让这个页面刷新了一下。请高手指教,如何关闭这个Iframe,但是保留我之前的父页面。

解决方案 »

  1.   

    iframe是嵌套在页面
    <input id="Button2" type="button" value="button" onclick="document.getElementById('iframe1').src = 'Default2.aspx';" /><br />
         <iframe id="iframe1" src="" height ="200" width="500" frameborder ="0" ></iframe>
      

  2.   


    我的IFrame是 <a href='javascript:JqueryDialog.Open( 
    是用一个JqueryDialog的JS文件给拼出来的,
    请问4楼我的document.getElementById('写JQuery里的IFRAME的ID').src = '我的父页面;" 但是我报JS错误说的是document.getElementById('写JQuery里的IFRAME的ID')位NULL,或者未找到实力对象呢?
      

  3.   

    等于我的意思是。我的iframe不是直接写在页面上的,而是写在JS文件里,在文件里给拼出来的。,
    document.getElementById('iframe1')好想是取不到的
      

  4.   

    现在主要是想知道如何关闭这个IFRAME了~刷新我已经弄好了