How to make an alert box? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 14

How to make an alert box?

Alert box

5th Jun 2020, 9:44 AM
LordOfThunder [Inactive]
LordOfThunder [Inactive] - avatar
67 Respostas
+ 34
https://code.sololearn.com/WtMBiW0r884K/?ref=app This is the sweet alert . It makes the alert box look more adorable in 2 lines of code
6th Jun 2020, 5:06 AM
Farhanaz šŸŒŸ
Farhanaz šŸŒŸ - avatar
+ 30
Hey bro, I know you got the answer, but a little thing I have to say you. The question you asked is one of the most basic thing in javascript. It shows that you didn't complete your JavaScript course anywhere. So, I request you bro to complete the course first. You'll get the answer automatically. Keep learning šŸ‘ Keep Coding.
5th Jun 2020, 10:08 AM
Kashyap Kumar
Kashyap Kumar - avatar
5th Jun 2020, 9:49 AM
Rik Wittkopp
Rik Wittkopp - avatar
7th Jun 2020, 3:03 AM
ƃKR
ƃKR - avatar
+ 15
Alert("write msg here");
5th Jun 2020, 6:19 PM
Akila Madusanka
Akila Madusanka - avatar
+ 11
Thnx
5th Jun 2020, 10:09 AM
LordOfThunder [Inactive]
LordOfThunder [Inactive] - avatar
+ 10
<!DOCTYPE html> <html> <head> <!-- try custom ALERT box --> <title>Page Title</title> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <link href="https://fonts.googleapis.com/css2?family=Varela+RouĆ²nd&display=swap" rel="stylesheet"> <style> body{background:black; font-family: 'Varela Round', sans-serif; } #al{padding:5px 10px 5px 10px;background:red;color:white;border-radius:1000px;position:center;font-size:25px;} #alb{height:80vw;width:80vw;background:white;border:5px solid orange;color:red;border-radius:13px;position:center;top:38vh;font-size:25px;} </style> </head><body><center><span id="al">ALERT</span></center><center><div id="alb"><br><br><br>HI!<br>I am ŚĄŃ</div></center> <script> $(function() { $("#alb").fadeOut(1); $("#al").click(function() { $("#alb").fadeIn(300); $("#al").fadeOut(100); $("#alb").delay(2000).fadeOut(1000); $("#al").delay(2900).fadeIn(100); }) })</script> </body> </html>
6th Jun 2020, 5:24 AM
SAN
SAN - avatar
+ 9
Use this syntax: alert("text") And remember to add quotes for strings
6th Jun 2020, 9:56 AM
Goke Ekundayo
Goke Ekundayo - avatar
+ 8
Alert("write your msg here");
5th Jun 2020, 9:48 AM
ABHISHEK
ABHISHEK - avatar
+ 8
Ninja Coder I am right now completing the CSS course and once I finish it I will start javascript
5th Jun 2020, 10:14 AM
LordOfThunder [Inactive]
LordOfThunder [Inactive] - avatar
+ 8
JS: alert('text') or window.alert('text')
5th Jun 2020, 10:47 AM
CodeFu
CodeFu - avatar
+ 8
alert("write something here");
5th Jun 2020, 5:22 PM
Agilesh
Agilesh - avatar
+ 8
intranet AnĀ alert boxĀ is often used if you want to make sure information comes through to the user. When anĀ alert boxĀ pops up, the user will have to click "OK" to proceed.
5th Jun 2020, 6:49 PM
Agilesh
Agilesh - avatar
6th Jun 2020, 2:45 AM
narayanaprasad
narayanaprasad - avatar
+ 8
I recomend you to learn boostrap 3.Check out this code <div class="container"> <div class="alert alert-danger alert-dismissible"> <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a> <strong>Danger!</strong>This alert box could indicates a potential dangerous or negative action.<a class="alert-link">Read this message</a> </div>
6th Jun 2020, 8:57 AM
Apongpoh Gilbert
Apongpoh Gilbert - avatar
+ 8
Js Window.alert("text")
7th Jun 2020, 6:47 AM
Ravindu Dilshan
Ravindu Dilshan - avatar
+ 7
Ok thnx
5th Jun 2020, 9:46 AM
LordOfThunder [Inactive]
LordOfThunder [Inactive] - avatar
+ 7
Ok thnx everyone
5th Jun 2020, 9:55 AM
LordOfThunder [Inactive]
LordOfThunder [Inactive] - avatar
+ 7
Ok
5th Jun 2020, 10:09 AM
LordOfThunder [Inactive]
LordOfThunder [Inactive] - avatar
+ 7
alert ("This is when you type your message")
5th Jun 2020, 11:34 AM
Bye