-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathj6 50.html
More file actions
49 lines (38 loc) · 730 Bytes
/
j6 50.html
File metadata and controls
49 lines (38 loc) · 730 Bytes
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
46
47
48
49
<html>
<head>
<script>
//if-else statement in javascript
//promt is used to take input from user
// var a = prompt("Enter the value of a");
// if(a > 50)
// {
// document.write ("a is greater");
// }
// else{
// document.write("a is less");
// }
// var r = confirm("Are you male");
// if(r == true)
// {
// x = "yes";
// }
// else
// {
// x = "not";
// }
// alert(x);
myfun()
{
var name = prompt("Write your name");
if(name = !null)
{
document.getElementByid("me") .innerHTML = "hello" + name + "How are you today";
}
}
</script>
</head>
<body>
<p id="me"></p>
<button onclick="myfun();">click button</button>
</body>
</html>