2008-10-14 62 views

回答

6

您可以使用JavaScript中 「OK」 的消息confirm的是/否問題和alert

另一種選擇是使用JavaScript彈出一個看起來像一個消息框並起作用的新窗口。這種情況下的情況因瀏覽器而異。在Internet Explorer中,方法

window.showModalDialog(url,name,params) 

將顯示模式對話框。 Mozilla的方法是仍然使用

window.open(url,name,params) 

但增加modal=yesparams列表。

2
result = confirm('Yes or no question here.') 
0

的JavaScript:

alert("This box has an OK button."); 
相關問題