javascript alert box | Sololearn: Learn to code for FREE!


javascript alert box

May i show alert box of js on specific position like in the middle for all browsers. when i tested the alert box in chrome ,firefox or opera ,these all browser show alert on different places.

2/19/2018 1:14:15 AM

Bipul Kumar Singh

2 Answers

New Answer


For that, you will need a custom alert box not just a normal alert because regular alerts are displayed differently on different browsers. Try SweetAlert.


i got the answer,we can not position the default dialog box of the browser.But we can design our own custom alert box using jquery or you can use 3rd party dialog box. Here are some substitute for the built-in dialogs of the browsers 1. 2. 3. 4. 5.