日期:2014-05-18  浏览次数:20449 次

脚本中页面转向问题?
我在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+ " ');