<form id="frm_1" name="frm_1" target="_self" method="GET" action="local_page.php" >
</form>
<form id="tgt_1" name="tgt_1" target="_blank" method="POST" action="http://stackoverflow.com/" >
</form>
<a onclick="test(event, '1'); " href="#" >Click Here</a>
<script>
function test(event, id){
document.getElementById("frm_"+id).submit;
document.getElementById("tgt_"+id).submit;
}
</script>
是否可以打开新选项卡/窗口并更改当前页面?如何打开新选项卡并更改当前页
仍尝试此目的。使用``是让浏览器状态栏显示href网址。我的原始代码在href参数为`href =“local_page.php”`且只有`document.getElementById(“tgt _”+ id).submit;`存在时起作用。但这意味着我无法向本地页面发布有关所选选项的任何信息。在这种情况下,使用GET和附加参数不是一个选项。 – 2008-11-06 13:19:22