+ 14
How to make an alert box?
Alert box
67 Answers
+ 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
+ 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.
+ 17
elismar Franklin sousa sousa don't share ur contact no. in this feed
https://www.sololearn.com/discuss/1316935/?ref=app
+ 15
Alert("write msg here");
+ 11
Thnx
+ 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>
+ 9
Use this syntax:
alert("text")
And remember to add quotes for strings
+ 8
Alert("write your msg here");
+ 8
Ninja Coder I am right now completing the CSS course and once I finish it I will start javascript
+ 8
JS:
alert('text')
or
window.alert('text')
+ 8
alert("write something here");
+ 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.
+ 8
You may find answer in https://www.w3schools.com/howto/howto_js_alert.asp
+ 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">×</a>
<strong>Danger!</strong>This alert box could indicates a potential dangerous or negative action.<a class="alert-link">Read this message</a>
</div>
+ 8
Js
Window.alert("text")
+ 7
Ok thnx
+ 7
Ok thnx everyone
+ 7
Ok
+ 7
alert ("This is when you type your message")