How to change the style of alert box?

后端 未结 13 1967
一生所求
一生所求 2020-11-22 01:49

I need to change the style of the \"OK\" Button in an alert box.

13条回答
  •  遇见更好的自我
    2020-11-22 02:35

    I don't think you could change the style of browsers' default alert boxes.

    You need to create your own or use a simple and customizable library like xdialog. Following is a example to customize the alert box. More demos can be found here.

    function show_alert() {
        xdialog.alert("Hello! I am an alert box!");
    }
    
        
        
        
        
    
    
        
    

提交回复
热议问题