-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
test1.html
71 lines (61 loc) · 1.99 KB
/
test1.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
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<title>avalon入门</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="avalon.js" ></script>
<!-- <script src="mobile.js" ></script>-->
<script>
var model = avalon.define({
$id: "test",
aaa: "xxx",
click: function(e) {
console.log("-------------")
console.log(this)
},
dblclick: function(e) {
console.log(e.type)
}
})
model.$watch("aaa", function(a) {
console.log(a)
})
window.onload = function() {
// var elem = document.querySelector("#son")
setTimeout(function() {
// elem.value = "dddddddddddddddd"
}, 3000)
setTimeout(function() {
// var el = document.querySelector("#parent")
// el.parentNode.removeChild(el)
}, 3000)
}
</script>
</head>
<body>
<style>
.ms-click-active{
color: red
}
#parent{
position: absolute;
top:200px;
left:200px;
}
#son {
position: absolute;
top:200px;
left:200px;
}
</style>
<div ms-controller="test">
<div id="parent" >
<input id="son" value="ddd"/>ddd
</div
<label for="female" ms-click="click" >Female</label>
<input name="sex" id="female" ms-click="click" disabled/>
<p type="button" ms-click="click" ms-on-dblclick="dblclick">sss</p>
<input disabled="disabled" ms-click="click" value="这是disabled元素">
</div>
</body>
</html>