The box_confirm() method displays a box with two buttons, one saying "OK" and one saying "Cancel". There are two parameters that control the result of whether you pressed OK or Cancel, in which you can insert coding into.
Browser support: all
Original TheMadScript Version: 1.0.0
Newer version: Version 2.0.0
Newer version: Version 2.0.0
Syntax: box_confirm(value,ok,cancel)
Any parameters that you don't need can be left blank (like this: "").
The following syntax below creates a confirmation box that says, "Press a button.", and returns an answer depending on which button you press. The result text will be an alert box telling you which button you pressed.
box_confirm("Press a button.","box_alert('You pressed OK.')","box_alert('You pressed Cancel.')");
No comments:
Post a Comment