当前位置: 代码迷 >> ASP.NET >> 脚本中页面转向有关问题
  详细解决方案

脚本中页面转向有关问题

热度:9787   发布时间:2013-02-25 00:00:00.0
脚本中页面转向问题?
我在iframe中的一个页面点确定后想转到另一页面,让这个页面也显示在iframe中,
代码应该怎么写?
我用window.open()可以打开此页,但其不是显示在iframe中,想用location,总是报错.

this.m_html   =   " <script> if   (showDisNew()==7){parent.window.close();}else{window.open( 'Customer_Message.aspx?id= "+custid+ " ');} </script> ";

this.m_html   =   " <script> if   (showDisNew()==7){parent.window.close();}else{document.location.href= 'Customer_Message.aspx?id= "+custid+ " ');} </script> ";

谢谢!


------解决方案--------------------------------------------------------
window.open()打开了一个新的窗口


else{window.location= 'Customer_Message.aspx?id= "+custid+ " ');
  相关解决方案