How to increase font size in javascript alert()

后端 未结 3 1206
面向向阳花
面向向阳花 2021-01-17 14:48

Can I control the font size of the string in a javascript alert() call??!

I\'ve the image below and I want to increase the font size so that it is legib

3条回答
  •  醉话见心
    2021-01-17 15:39

    As far as I know, it is not possible.

    However, you have a several choices:

    If you want to create it yourself as a totally custom thing, create a new div element in your DOM (as the last child of the body, and give it the maximum z-index you can or you use), position that absolute (top:0,left:0), and write there HTML whatever you want. With some JS you can positon it to center of the screen/layout. :)

    Or use jQuery UI Dialog... :)

提交回复
热议问题