Insert HTML Into Your Browser Alert & Confirm Dialog | alert4html.js

alert4html.js is a JavaScript library that enables you to insert HTML directly into your browser alerts while simulating Chrome alerts as well.

alert4html.js is an alternative to the browser alert/confirmation dialog that allows you to create a rich text alert and confirm the dialog boxes on the page.

How to make use of it:

1. Import the alert4html.js JavaScript library and we’re able to go.

<script src="/src/script.min.js"></script>

2. Create a primary alert dialog.

new HTMLAlert('Alert!','<h1>A Basic Alert Dialog</h1>'

3. Create a customized affirm dialog with buttons and a callback function.

buttons = {
  "cheese": {
    type: "proceed",
    content: "Okay"
  "idk": {
    type: "cancel",
    content: "Thanks"
callback = function(content, type){
  console.log("You chose "+content);
alert = new HTMLAlert('Confirm Dialog', "<h1>Are You Sure?</h1><b>Click The Okay Button To Delete This Entry</b>", buttons, callback);

Rich Text Browser Alert & Confirm Dialog, alert4html.js Plugin/Github

See Demo And Download

Official Website(ColonelParrot): Click Here

This superior jQuery/javascript plugin is developed by ColonelParrot. For extra Advanced Usage, please go to the official website.