You can't, but you can (and should) use a pop-up for this:
Or a pop-in, a <div> or so with your own buttons which you show and hide at
will, at the same covering the page to temporarily disable interaction. This
solves all problems with pop-up blockers and no resources are wasted on a
whole new window.
The confirm, alert and input message boxes were never designed for
user interaction, only for debug purposes.
Their original purpose is as relevant as the next thing. Those message boxes
are extremely useful and useable and I am sure many end users, from geeks to
total newbies, appreciate their lightweightness, straightforwardness and
absolute clarity to the point where even the buttons *always* read the same
thing.