-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathindex.html
More file actions
26 lines (25 loc) · 1.23 KB
/
index.html
File metadata and controls
26 lines (25 loc) · 1.23 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.js"></script>
<script type="text/javascript">
$(function(){
alert('кол-во параграфов: ' + $('p').size());
alert('общее кол-во элементов c классом some-class: ' + $('.some-class').size());
alert('кол-во параграфов c классом some-class: ' + $('p.some-class').size());
alert('содержание элемента с id=some-id: ' + $('#some-id').text());
alert('фильтры: первый элемент: ' + $('p:first').text());
alert('фильтры: последний элемент: ' + $('p:last').text());
})
</script>
</head>
<body>
<p id="some-id">Paragraph 1</p>
<p class="some-class">Paragraph 2</p>
<p>Paragraph 3</p>
<p class="some-class">Paragraph 4</p>
<span class="some-class">span 1</span>
</body>
</html>