ASP中使用按钮跳转页面,如何使新网页内容在原窗口显示?

来源:百度知道 编辑:UC知道 时间:2024/05/22 15:40:32
如题。
使用的命令是<input type="button" onclick="window.open('a.asp')" />。<button></button>命令也同样。
如果不可以的话,用什么方法可以使按钮实现原窗口显示新页内容呢?
用链接和表单的话当然没这种问题了。

<input type="button" onclick="window.location='a.asp'" />。

ASP中使用按钮跳转页面并使新网页内容在原窗口显示的代码如下:
<input type="button" onclick="window.location='a.asp'" />

打开新窗口,同时刷新本页
<input type="button" onclick="window.open('a.asp');location.reload();" />

<input type="button" onclick="location.replace('2.htm')"/>

在head中加上<base taget="_self"/>