-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
84 lines (78 loc) · 2.9 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>脚本项目</title>
<style media="screen">
* { padding: 0; margin: 0; }
iframe { display: block; width: 540px; height: 120px; margin-top: 20px; border: 1px solid #ddd; box-sizing: border-box; }
</style>
<script type="text/javascript" src="./jquery.js"></script>
<!-- 基本模块 -->
<!-- <script src="./mods/global.js" charset="utf-8"></script>
<script src="./mods/path.js" charset="utf-8"></script>
<script src="./mods/scriptLoader.js" charset="utf-8"></script>
<script src="./mods/main_global.js" charset="utf-8"></script>
<script src="./mods/main_config.js" charset="utf-8"></script>
<script src="./mods/main_define.js" charset="utf-8"></script>
<script src="./mods/main_require.js" charset="utf-8"></script>
<script src="./mods/main_interface.js" charset="utf-8"></script> -->
<!-- 额外模块 -->
<!-- <script src="./mods/plugin/ajaxLoader.js" charset="utf-8"></script>
<script src="./mods/plugin/linkLoader.js" charset="utf-8"></script> -->
<script type="text/javascript" src="./project.full.min.js"></script>
</head>
<body>
project.full.js 相对于 project.js,增加了3个loader板块:<br/>
1. ajax loader,可进行ajax请求<br/>
2. json loader,可进行ajax请求,并将内容转为 json [基于 ajax loader 开发]<br/>
3. css loader,可进行css加载<br/>
<br/>
同时,拓展了 window.require 两个方法:<br/>
1. require.ajax,可用于 ajax 请求<br/>
2. require.css,可用于 css 加载<br/>
<iframe src="./test01.html"></iframe>
<div>防止IE抽搐</div>
<iframe src="./test01.html"></iframe>
<div>防止IE抽搐</div>
<iframe src="./test02.html"></iframe>
<div>防止IE抽搐</div>
<iframe src="./test03.html"></iframe>
<div>防止IE抽搐</div>
<iframe src="./test04.html"></iframe>
<div>防止IE抽搐</div>
<iframe src="./test05.html"></iframe>
<div id="test">样式测试文本</div>
<!-- <script type="text/javascript">
define("mod1", function(require, exports, module){
console.log('require module: mod1');
module.exports = {
hello: function(){
console.log('hello mod1');
}
}
});
define("mod2", function(require, exports, module){
console.log('require module: mod2');
module.exports = {
hello: function(){
console.log('hello mod2');
}
}
});
define("mainXX", function(require, exports, module) {
console.log('require module: main');
var mod1 = require('mod1');
mod1.hello();
var mod2 = require('mod2');
mod2.hello();
return {
hello: function() {
console.log('hello main');
}
};
});
require("mainXX");
</script> -->
</body>
</html>