T
T
Therapyx2015-07-25 13:53:31
JavaScript
Therapyx, 2015-07-25 13:53:31

How to center js alert?

There is such button in aspx page

<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="button" CommandName="Delete"
                                       OnClientClick="return confirm('Are you sure?');"/>

Is it possible to make the appearing alert box be in the center of the screen, and not at the very top, as it is by default?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Malko, 2015-07-25
@Therapyx

The native alert cannot be changed in any way. But sweetalert2 is very easy to change.

A
Alexey Ukolov, 2015-07-25
@alexey-m-ukolov

It is forbidden.
If you want beauty - use plugins, there are a lot of them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question