0

How to increase font-size of alert massage in Javascript

Can we apply css on Javascript alert ("xxxxxxx"). Is it possible Please explain. I want to increase the font size of this alert massage.

21st Aug 2020, 7:52 AM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
2 odpowiedzi
+ 3
No, this is controlled by the browser. I don't use alerts anymore I use jQuery UI dialog, it's fully customizable use this-: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery UI Dialog - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $( "#dialog" ).dialog(); } ); </script> </head> <body> <div id="dialog" title="Basic dialog"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> </div> </body> </html>
21st Aug 2020, 8:01 AM
Akash Agrawal
Akash Agrawal - avatar
0
one possibility that i can think of. is by redefining alert function to create new element that act as the old alert replacement.. ohh this will be fun to code, i can feel it
21st Aug 2020, 8:08 AM
Rei
Rei - avatar