-1
var val= confirm("Are you sure to cancel?");

By default, the above line of code will bring a popup with two choices, Ok, Cancel and Ok will be the default choice. I want change the default choice to be Cancel and I would like to swap the both button's position. So Cancel will be displaying first and Ok comes later.

How can I achieve this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Hello123
  • 71
  • 1
  • 6

1 Answers1

0

This is not possible if this behaviour is important I would look for a JavaScript library that achieves what you want for instance http://getbootstrap.com/javascript/#modals

Rajdeep Dosanjh
  • 1,157
  • 1
  • 9
  • 20