简体   繁体   中英

Can i edit the buttons of a browser dialogs?

I was wondering if it's possible to change the text of the OK/Cancel buttons in dialogs?

在此处输入图片说明

there is not a part of html or css so you cannot change it anymore. here for refrence

possible but you need to create a custom alert dialog

https://tutorialzine.com/2010/12/better-confirm-box-jquery-css3

You may with HTML5 which permits you to create your own customized dialog boxes, as the following example illustrates:

HTML:

<dialog open id="favDialog">
  <form method="dialog">
    <section>
      <p>Leave this site?</p>
    </section>
    <menu>
      <button id="cancel" type="reset">No</button>
      <button type="submit">Yes</button>
    </menu>
  </form>
</dialog>

See live code

This code to date is only supported by a couple of the major browsers, namely Chrome 37 and Opera 24 (see more details here ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM