-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhtml17.html
51 lines (42 loc) · 907 Bytes
/
html17.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
<!DOCTYPE html>
<html>
<head>
<title>Hello world</title>
<script
src="http://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(() => {
$('#h').click( () => {
$('#h').text("Hello world")
})
});
</script>
</head>
<body>
<h1 id="h">Heading</h1>
<p id="p1">This is a paragraph 1</p>
<p>This is a paragraph 2</p>
<div>
<h2>This is h2</h2>
</div>
<ul id='ul'>
<li>list 1</li>
<li>list 2</li>
<li>list 3</li>
</ul>
<button onclick="addItem()">Click</button>
<script type="text/javascript">
setTimeout(() => {
$('#h').text("Heading");
$('#h').css("border-style","dashed");
} ,5000);
$('#p1').click( (e) => {
$(e.currentTarget).html('<h2>foo bar</h2>')
.fadeOut(3000)
.fadeIn(3000);
})
</script>
</body>
</html>