看板 Web_Design 關於我們 聯絡資訊
假設現在我的視窗是A.php 我想要按下"這是超連結之後"開啟視窗B.php <a href="JavaScript:window.open('B.php','123','width=300,height=600')" target="_blank">這是超連結</a> //這是寫在A.php裡面的 但是當我按了之後 會跑出C視窗 網址如下 javascript:window.open('B.php','123','width=300,height=600')的新視窗 和B.php的新視窗 請問各位大大 有辦法隱藏執行window.open這個屬性嗎?? 也就是不會出現C視窗 只會出現B.php PS:我之所以不使用函示 是因為函示抓不到我要傳到B.php的值 詳情請看5694和5696 3Q -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.217.105.20
LPH66:把target="_blank"拿掉 12/25 18:21
LPH66:window.open本來就會新開視窗 不必再target="_blank"指定 12/25 18:21
imccloud:如果只把target=_blank拿掉的話 A視窗就會變成C視窗了 12/25 18:52
LPH66:那不要用href 用onClick 12/25 19:21
imccloud:感謝大大的分享 終於搞定了^^ 12/25 20:00