By default, there are two buttons:"ok" and "cancel" in confirm().
Is there a way to rename them?
https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-confirm
According to the standard that defines confirm()
, there is no way to specify custom button labels.
The browser must display a "positive or negative" prompt (e.g. OK/Cancel) to comply with HTML5.