<script>
alert('更新成功!');
parent.document.hidden_frame.location='./admin/news/moving.jsp?& amp;folderName=news';
parent.window.location = './newsManagement.do?operate=toNews';</script>
其他浏览器运行正常 在火狐下提示错误:parent.document.hidden_frame is undefined求解决办法

解决方案 »

  1.   

    1. 父页面中的hidden_frame是元素的name还是id?火狐认id
    2. 标准获取页面元素的方法是document.getElementById('hidden_frame');
    3. parent其实就是父页面的窗口引用,所以parent.window.location应该写成parent.location
    alert('更新成功!');
    var P = window.parent;
    P.document.getElementById('hidden_frame').location='./admin/news/moving.jsp?& amp;folderName=news';
    P.location = './newsManagement.do?operate=toNews';