-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjQuery HTML_01.html
More file actions
67 lines (57 loc) · 1.25 KB
/
Copy pathjQuery HTML_01.html
File metadata and controls
67 lines (57 loc) · 1.25 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="http://ajax.microsoft.com/ajax/jquery
/jquery-1.4.min.js"></script>
<style>
#box1{
height:50px;
background:yellow;
}
#box2{
height:200px;
background:blue;
/*display:none;*/
}
</style>
<script>
$(function(){
$('#box1').mouseleave(function(){
$('#box2').slideDown();
});
});
</script>
<script>
$(function(){
$('#box1').click(function(){
$('#box2').slideUp();
});
});
</script>
<script>
$(function(){
console.log($('h1').text());
$('button').click(function(){
$('h1').text('set text..');
$('input').val('tom');
});
});
</script>
<script>
$(function(){
$('button').click(function(){
alert('HTML:'+$('h1').html());
});
});
</script>
</head>
<body>
<div id="box1"></div>
<div id="box2"></div>
<h1>headine...</h1>
<input type="text">
<button>val</button>
</body>
</html>