/
index.html
56 lines (45 loc) · 1.4 KB
/
index.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
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试</title>
<style>
</style>
<script src="mass.js"></script>
<script>
require("class,node", function($) {
var Animal = $.factory({
init: function(name) {
this.name = name
},
getName: function() {
return this.name;
},
setName: function(name) {
this.name = name;
}
});
var a = new Animal("zzz");
var Dog = $.factory(Animal, {
init: function(name, age) {
this.age = age;
},
getAge: function() {
return this.age;
},
setAge: function(age) {
this.age = age;
}
});
var dog = new Dog("dog",222);
console.log(a);
console.log(dog)
})
</script>
</head>
<body>
<button onclick="">Test</button>
<a href="aaa">司徒正美</a>
</body>
</html>