-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello.html
62 lines (52 loc) · 1.42 KB
/
hello.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script>
document.write('Hello');
</script>
<!---possibility --1-->
<br>
<p id="ics"></p>
<script>
document.getElementById('ics').innerHTML = 'This is my first JS';
document.getElementById('ics').style.fontSize='18px';
document.getElementById('ics').style.display = 'block';
</script>
<button onclick="document.getElementById('MyImg'). src='images/bulb1_on.jpeg'">Turn On</button>
<button onclick="document.getElementById('MyImg'). src='images/bulb_off.jpeg'">Turn Off</button>
<img src="images/bulb_on.jpg" id="MyImg" width="350px">
<!--possibility 3-->
<script>
window.alert('Connection Failed');
</script>
<!--Possibility 4-->
<a href="#" onclick="return confirm('Are you sure?')">Delete</a>
<!--Possibility 5-->
<script>
console.log(45/15);
</script>
<script>
function MyScript(){
document.getElementById('ics_D').innerHTML = 'This is my second js line';
}
</script>
<br>
<span id="ics_D" onclick="MyScript(5,9);">Next</span>
<br>
<script>
var age = 18;
let lastname = 'Okama';
const db_name = 'ics_d';
document.write('I am '+ age + 'years old' + 'and my last name is'+ lastname +' , ');
if(age > 18){
document.write('I am an adult');
}else{
document.write('I am not an adult');
}
</script>
</body>
</html>