<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