0
我試圖通過單擊窗體中的按鈕打開彈出窗口。我的代碼如下所示彈出窗口代碼失敗
HTML
<form>
<div class="form" align="center">
<button class="form_sub_btn" onclick="popitup()">Next</button>
</div>
</form>
的JavaScript:
function popitup(url) {
newwindow=window.open(url,"","height=400,width=350");
if(!newindow){
alert('We have detected that you are using popup blocking software.');}
if (window.focus) {newwindow.focus();}
}
function popitup(){
window.open("","","height=300, width=300");
}
後者的功能,我把導致前者沒有得到給定的URL執行。
任何幫助表示讚賞。謝謝!
我已經試過了。再試一次。仍然沒有彈出窗口打開。 – thanatos
@thanatos我的編輯幫助嗎? – Boann
不,它不。 – thanatos