Javascript - rename confirm() buttons

后端 未结 4 752
一个人的身影
一个人的身影 2020-12-18 20:13

By default, there are two buttons:\"ok\" and \"cancel\" in confirm().
Is there a way to rename them?

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-18 20:58

    You can't change the buttons of the default confirm popup. A workaround is to recreate the whole popup in JavaScript. One such workaround is http://jqueryui.com/dialog/#modal-confirmation

提交回复
热议问题