Javascript中的是/否对话框 [英] Yes/No dialog box in Javascript
本文介绍了Javascript中的是/否对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Javascript中是否有是/否对话框?谢谢
Is there a Yes/No dialog box in Javascript? Thanks
推荐答案
BillGatesFan写道:
BillGatesFan wrote:
Javascript中是否有是/否对话框?谢谢
Is there a Yes/No dialog box in Javascript? Thanks
嗯,有点,但文字是/否是取决于浏览器:
确认(是或否);
如果您同意,则确认框返回true,否则返回false,所以你可以这样做:b / b
if(确认(是或否)){//如果是的话
}
else {//如果没有
}
Well, sort of, but the text "Yes/No" depends on the browser:
confirm("Yes or no");
The confirm-box returns true if you say yes and false if no, so you can
do something like this:
if (confirm("Yes or no")) {//if yes
}
else { // if no
}
BillGatesFan写道:< br>
BillGatesFan wrote:
Javascript中是否有是/否对话框?
是的。
谢谢
Is there a Yes/No dialog box in Javascript?
Yes.
Thanks
欢迎。
-
兰迪
comp.lang.javascript常见问题 - http://jibbering.com/faq
有!我认为Confirm()在对话框中输入OK和Cancel?你
可以放是或否?怎么样?
***通过开发人员指南 http:// www.developersdex.com ***
不要只参加USENET ......获得奖励!
There is! I thought Confirm() puts OK and Cancel on the dialog box? You
can put Yes or No? How?
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
这篇关于Javascript中的是/否对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文