在C# Web程序中,如为页面按钮写返回上一页代码www.goodsgy.com
this.RegisterClientScriptBlock("E", "<script language=javascript>history.go(-2);</script>");www.goodsgy.com
其中,history.go(-2),要写为-2,因在按钮事件触发前,已刷新一次页面,所以应是-2。www.goodsgy.com
Response.Write("<script language=javascript>history.go(-2);</script>");www.goodsgy.com
此处也要写为“-2”。跟直接写脚本的有所不同。 www.goodsgy.com
http://brawei.cnblogs.com/archive/2006/06/28/438149.htmlwww.goodsgy.com