-
Notifications
You must be signed in to change notification settings - Fork 17
/
JY-Demo.html
65 lines (64 loc) · 1.63 KB
/
JY-Demo.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> JY-DEMO </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript" src="JY.js"></script>
<script>
JY.ready(function(){
console.log( JY.byId("li1") );
console.log( JY.next("li1") );
console.log( JY.prev("li3") );
console.log(JY.first(JY.child("myDiv")[0]));
console.log(JY.last(JY.child("myDiv")[0]));
//console.dir(JY.query("li"))
var list1= new List();
list1.push("sdf");
list1.push("999");
var list2= new List();
list2.push("11");
list2.push("22");
//console.dir(list1.concat(list2))
var list =new List();
console.dir(list.concat(Array.prototype.slice.call(list2).concat(Array.prototype.slice.call(list1))).slice(1));
/*
JY.ajax({
url:"ajax.asp",
data:{a:11,b:22},
type:"POST",
async:false,
dataType:"json",
success:function(r){
console.info(r);
}
});
JY.post("ajax.asp",{"a":2},function(r){
console.log(r)
},"json");
JY.get("ajax.asp?",{"id":2},function(r){
console.log(r)
},"html");
*/
console.dir(JY.query("ul").find("li").filter(":not(.li)"))
});
</script>
</head>
<body>
<div id="myDiv">
<ul class="ul">
<li id="li1">11111</li>
<li id="li2">22222</li>
<li id="li3">33333</li>
<li id="li4">44444</li>
</ul>
<ul class="ul2">
<li class="li">aaa</li>
<li class="li">bbb</li>
<li class="li">ccc</li>
</ul>
</div>
</body>
</html>