confirm button to confirm usage

Implicit conversion ternary operator Boolean expression, the use of

The basic wording

var res = confirm ( "You want to quit?");
        res == true alert ( 'OK to exit'):? alert ( "Cancel to exit");

  

 

Guess you like

Origin www.cnblogs.com/qdxbls/p/11094846.html