开发者

Javascript's JOptionPane equivalent?

I've go开发者_高级运维t an alert box but I'd like there to be an Okay and then a Canel button like a JOptionPane in Java.

Basically it'd work like this...

"Message"
 if okay then 
 this();
 else 
 that();

Does Javascript have this built in?


Are you looking for the confirm function?

if (confirm('Message?')) {
  this();
} else {
  that();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜