-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
58 lines (53 loc) · 2.01 KB
/
index.html
File metadata and controls
58 lines (53 loc) · 2.01 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="js/hazzle.js"></script>
<script src="js/fix.js"></script>
<script src='js/fix-xpath.js'></script>
<script type="text/javascript">
window.addEventListener("load", function(){
window.result = [];
window.xresult = [];
result.push($f("#some_id"));
result.push($f(".some_class"));
result.push($f("body *"));
result.push($f("body div *"));
result.push($f("body div"));
result.push($f("body>div"));
result.push($f("body>.some_class"));
result.push($f("#some_id input:checked"));
result.push($f("#some_id input:not(:checked)"));
result.push($f("#some_id option:checked"));
result.push($f("#some_id>select>option:not(:checked)"));
/* xpath tests */
xresult.push($fx("*"));
xresult.push($fx("body > *"));
xresult.push($fx("body>div *"));
xresult.push($fx("body div"));
xresult.push($fx("body>div"));
xresult.push($fx("body .some_class"));
xresult.push($fx("div[class*=some]"));
xresult.push($fx("body > div + div"));
xresult.push($fx("body>div ~ div"));
});
</script>
</head>
<body>
<div></div>
<div id="some_id" class="some_class some_other_class">
<div>
<input id="checkbox1_id" type="checkbox" checked="checked" value="checkbox1" />
<input id="checkbox2_id" type="checkbox" value="checkbox1" />
<input id="checkbox3_id" type="checkbox" value="checkbox1" />
</div>
<select>
<option>A</option>
<option>b</option>
<option>c</option>
<option selected="selected">d</option>
</select>
</div>
<img id="some_other_id" class="some_class some_other_class"></img>
<input type="text">
</body>
</html>