forked from samchampkittisak/htmlex1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml14.html
48 lines (36 loc) · 843 Bytes
/
html14.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
<!DOCTYPE html>
<html>
<head>
<title> Hello world </title>
<script
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></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>
</ul>
<button onclick="addItem()"> Click </button>
<script type="text/javascript">
jQuery('#h').click(function () {
// change text to hello world
jQuery('#h').text("Hello world");
})
setTimeout(function() {
jQuery('#h').text("Heading");
jQuery('#h').css("border-style","dashed");
} ,8000);
jQuery('#p1').click(function(){
jQuery(this).html('<h2>foo bar</h2>');
})
</script>
</body>
</html>