-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (39 loc) · 1.19 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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Web Project</title>
<script src="/jsProj/js/myrequire.js"></script>
</head>
<body>
<script>
/**
* 初始化,baseUrl 和 外部文件载入
*/
require.config({
baseUrl:"/jsProj/js",
paths : {
'jquery' : {
'url' : "core/jquery-1.7.2",
'exports' : "$"
},
'util' : {
'url' : "core/util",
'exports' : '$util'
}
}
})
require(['require/math','jquery','util'],function(math,$,U){
math.addsome();
console.log($('body'))
console.log(U.type(''))
});
require(['mylibs/event'],function(E){
console.log(E)
E.addEvent(document,'click',function(){
alert(123)
})
})
</script>
</body>
</html>