在.net里面的按钮事件里用脚本打开新的页面,在新页面里面添加了<base target="_self">
是这个原因吗,如果不添加的话,如何在该页面进行提交
用了一些window.parent.location.reload();
window.opener.location.reload();
都不起作用
是这个原因吗,如果不添加的话,如何在该页面进行提交
用了一些window.parent.location.reload();
window.opener.location.reload();
都不起作用
解决方案 »
- 急██导入Execl
- 面试问,.net做的某网站速度慢,怎么改进?
- 关于webservice返回值的问题
- help....帮我看看为什么输入查询条件时,还是显示所有数据...
- 初次接触oracle,问题很多???
- 高手看看在项目设计时这种问题如何处理:在开发后期,经常发现数据层缺少了一些方法,导致又要返回到数据层添加方法,再在BLL中再做对应
- 如何获取跳转后的地址。
- 求大神远程调试下ASP.NET问题。在此小弟不胜感激(在线等)
- 导航控件一直失败,请大家来看一下
- 邮件,help!
- js文件中的函数如何得到asp.net的控件值?
- 怎样在ASP页面(或者普通网页)里嵌入VBS脚本,使其在客户端执行之 ???????
{
string strScript="\n";
strScript += "<script>\n";
//strScript += "window.opener.document.returnValue='" + this.RadioButtonList1.SelectedItem.Text.Replace("'", "\'") + "'\n";
//strScript +="window.opener.document.forms[0]."+control.Value+".value='" + this.RadioButtonList1.SelectedItem.Text+ "'\n";
strScript +="window.parent.location.reload();\n";//不起作用
//strScript +="window.parent.close();\n";//不起作用
strScript +="document.close();\n";
strScript += "window.close()\n";
strScript += "</script>\n";if (!IsClientScriptBlockRegistered("clientScript"))
RegisterClientScriptBlock("clientScript", strScript);
}
这是我的代码,不知道是哪里出了问题
Response.Write("<script>window.opener.location='UserList.aspx'</script>");
其中'UserList.aspx'是你打开它的页面。
用这种方法可以重新打开一个,但是想刷新啊,我的用window.opener 总是出错,用window.parent就可以
因为保存了session值,所以重新打开窗口的话会出错