-
Notifications
You must be signed in to change notification settings - Fork 0
/
Important.html
45 lines (39 loc) · 1.29 KB
/
Important.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alert,Prompt,confirm</title>
</head>
<body>
<div class="container">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis, recusandae ratione esse aspernatur accusantium ipsam. Ex facilis laboriosam sit, unde fuga amet praesentium?
</div>
<script>
// alert in browser in javaScript.
alert("This is a message.")
// using this function alert a modal window opens.
// this does not return any thing
// prompt in the browser.
let name=prompt("What is your name ?", "Guest")
console.log(name);
let del=confirm("DO you really want to delete this post...");
//console.log(del);
if(del){
console.log("Your post has been deleted successfully.");
}
else{
console.log("Your post is not deleted.")
}
// Task(Asignment)
let age=prompt("what is your age?");
if(age>18)
{
console.log("Your are eligible.")
}
else{
console.log("You are not eligible.")
}
</script>
</body>
</html>