How many arguments are there for confirm box?
What does var del=confirm("Are you sure?","Delete","");
means?
views:
71answers:
3
+6
A:
It has a single argument which represents the text. In your example the last two arguments will be ignored. I suppose it is a failed attempt to personalize the buttons.
Darin Dimitrov
2010-07-19 06:30:51
It's perhaps interesting to know that `confirm` is part of "DOM Level 0", so not actually part of any standard. So it's quite possible that there do exist browsers that use additional parameters to customize the text on the buttons. But none that I'm aware of do...
Dean Harding
2010-07-19 06:35:23
@Dean, great remark, thanks.
Darin Dimitrov
2010-07-19 06:36:45
+1
A:
use this only ....
var del=confirm("Are you sure?");
else must be ignored.....this is the default feature in confirm box... that show "ok" and "cancel" by its own
and this will return true.
.if "ok" clicked.. and rteurn false
...if "cancel " clicked
Richa
2010-07-19 06:33:02