I need to change the style of the "OK" Button in an alert box.
<head>
<script type="text/javascript">
function show_alert() {
alert("Hello! I am an alert box!");
}
</script>
</head>
<body>
<input type="button" onclick="show_alert()" value="Show alert box" />
</body>
You need to create your own alert box like this:
The js portion gets the element in the HTML to create the alert box, then deletes it after the user clicks ok.
You can call the alert using
jAlert("Custom Text", "Ok!");
Not possible. If you want to customize the dialog's visual appearance, you need to use a JS-based solution like jQuery.UI dialog.
One option is to use altertify, this gives a nice looking alert box.
Simply include the required libraries from here, and use the following piece of code to display the alert box.
The output will look like this. To see it in action here is the demo
Option1. you can use AlertifyJS , this is good for alert
Option2. you start up or just join a project based on webapplications, the design of interface is maybe good. Otherwise this should be changed. In order to Web 2.0 applications you will work with dynamic contents, many effects and other stuff. All these things are fine, but no one thought about to style up the JavaScript alert and confirm boxes. Here is the they way
create simple js file name jsConfirmStyle.js. Here is simple js code
Create simple html file