testLou.html
1.86 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<title>Title</title>
</head>
<body>
<style>
.aaa {
color: red;
}
</style>
<div class="p">
<div class="aaa" id="a" data-url="111">aaaa</div>
<div class="bbb" data-url="111">abbbb</div>
<div class="bbb" data-url="111">abbbb</div>
<div class="bbb" data-url="111">abbbb</div>
<div>a2111</div>
</div>
<div class="p">
<div class="asd" data-url="112">2222</div>
<div class="asd aaa" data-url="113">333333</div>
<div class="asd aaa" id='b' data-url="114">bbbb</div>
</div>
<button onclick="fun()">button</button>
<!--<script src="./jq.js"></script>-->
<script src="../build/sdk.js"></script>
<script>
var $ = window.yo_sdk.$;
function fun() {
console.log(arguments[1])
var obj = $('.p').find('.aaa')
console.log(obj)
// $('#a').click(function(){
// console.log(111);
// console.log(this);
// })
//var arr = $('body').find('.asd').attr('data-url','aaaa');
// $('body').find('.aaa').each(function(index,el){
// $(el).html('<p>asdasdsa</p>')
//});
//var b = $('.aaa');
// console.log(b.last());
// b.appendTo('.bbb');
// var b = document.getElementsByClassName('aaa');
// var len = b.length
// for (var i = 0; i < len; i++) {
// console.log();
// if(b[i] !== document.getElementById('a')){
// debugger;
// var el = b[i].cloneNode(true);
// document.getElementById('a').appendChild(el)}
// }
// console.log(document.querySelectorAll('#a'))
}
</script>
</body>
</html>