A,B页面 A为父窗体,B为子窗体从A打开B ,a = window.showModalDialog(.....在B中
<html>
<head>
<base target="_self" /> //head中已添加<base target="_self"/>
</head><a href="B页面" /> //<---这样在b页面中刷新是不会打开新窗体<script> self.location.href = "B页面" ;</script> //<--这样会新打开一个b窗体
</html>请问怎样处理才不会在location.href这种方式下打开新窗体而只是像_self这样刷新?
<html>
<head>
<base target="_self" /> //head中已添加<base target="_self"/>
</head><a href="B页面" /> //<---这样在b页面中刷新是不会打开新窗体<script> self.location.href = "B页面" ;</script> //<--这样会新打开一个b窗体
</html>请问怎样处理才不会在location.href这种方式下打开新窗体而只是像_self这样刷新?
window.location.replace不行,还是会弹出新的窗体
<body>
<a href="b.html">hi</a>
<script>
function refresh(){
self.location.reload();
}
</script>
<input type="button" value="hi" onclick="refresh()" />
<body>
标题写错了。不是单纯刷新,是要带http参数访跳转到原来的窗体
已经有<base target='_self'>
是要在子页面上按一个按钮然后带url参数刷新这个子页。不单是reload