How to get Text BOLD in Alert or Confirm box?

后端 未结 3 992
陌清茗
陌清茗 2020-12-01 17:59

How to get BOLD Text and change color of text in Alert or Confirm box?

var conFrm =  confirm(\"Following List(s) already Sent...!\\nList Name:          


        
相关标签:
3条回答
  • 2020-12-01 18:09

    You can't do it. But you can use custom Alert and Confirm boxes.

    You can read about some User Interface libraries here:

    http://speckyboy.com/2010/05/17/15-javascript-web-ui-libraries-frameworks-and-libraries/

    Most common libraries are:

    • http://jqueryui.com/
    • http://mootools.net/
    • http://www.prototype-ui.com/
    • http://script.aculo.us/
    • http://developer.yahoo.com/yui/
    0 讨论(0)
  • 2020-12-01 18:12

    Maybe you coul'd use UTF8 bold chars.

    For examples: https://yaytext.com/bold-italic/

    It works on Chromium 80.0, I don't know on other browsers...

    0 讨论(0)
  • 2020-12-01 18:27

    The alert() dialog is not rendered in HTML, and thus the HTML you have embedded is meaningless.

    You'd need to use a custom modal to achieve that.

    0 讨论(0)
提交回复
热议问题