-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path13-number.html
69 lines (57 loc) · 1.86 KB
/
13-number.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
63
64
65
66
67
68
69
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery practice</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-3.6.0.min.js"></script>
</head>
<body>
<section class="content">
<div class="header">
<h2><button class="indexManin"><a href="index.html" class="home">Home</a></button>
Tutorial: jQuery Fundamentals</h2>
</div>
<div class="maincontent">
<u><h3 align="center">jQuery Set: 1.Text, Html, Value</h3></u><br>
<p id="lorem1">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
<p id="lorem2">Lorem ipsum dolor sit amet.</p>
<p>Name: <input type="text" value="Your name" id="lorem3" style="padding: 5px; "></p><br><br>
<button id="btn1" class="btn">Set Text</button>
<button id="btn2" class="btn">Set HTML</button>
<button id="btn3" class="btn">Set Value</button>
<script type="text/javascript">
$(document).ready(function(){
$("#btn1").click(function(){
$("#lorem1").text("I love jQuery.");
});
$("#btn2").click(function(){
$("#lorem2").html("<h1>My name is Tarequr Rahman Sabbir.</h1>");
});
$("#btn3").click(function(){
$("#lorem3").val("Enter your name.");
});
});
</script><br><br>
<u><h3 align="center">jQuery Set: 2.Attribut</h3></u><br>
<p><a href="https://www.google.com" id="link">Google</a></p>
<button id="btn4" class="btn">Set Value</button>
<script type="text/javascript">
$(document).ready(function(){
$("#btn4").click(function(){
$("#link").attr("href","https://www.facebook.com");
$("#link").text("Facebook");
});
});
</script><br><br>
</div>
<div class="footer">
<h2>
<script type="text/javascript">
var year = new Date();
document.write(year.getFullYear());
</script> © Tarequr Rahman Sabbir</h2>
</div>
</section>
</body>
</html>