开发者

Javascript's JOptionPane equivalent?

开发者 https://www.devze.com 2023-02-19 17:38 出处:网络
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.

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

精彩评论

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