This question already has an answer here:
这个问题已经有了答案:
- how to change the style of alert box 10 answers
- 如何改变警告框的样式10个答案?
How can i change alert box button style?
如何更改警告框按钮样式?
Is it possible ?. or have to make dialog instead of alert
.
这可能吗?。或者用对话代替警告。
1 个解决方案
#1
2
Style of alert()
JS function is defined by the browser you are using. You can't change that.
alert() JS函数的样式由您使用的浏览器定义。你不能改变这一点。
But you can implement custom alert boxes using, for example, jQuery UI or other libraries.
但是,您可以使用jQuery UI或其他库实现自定义警报框。
#1
2
Style of alert()
JS function is defined by the browser you are using. You can't change that.
alert() JS函数的样式由您使用的浏览器定义。你不能改变这一点。
But you can implement custom alert boxes using, for example, jQuery UI or other libraries.
但是,您可以使用jQuery UI或其他库实现自定义警报框。