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();
}
精彩评论