Extjs首日工作总结
1、随着Extjs版本的提升,官方文件进行了文件结构的改变。比如说老版本的adapter文件夹被删除了,但是我看的书里面还是有对这个的引用,
2、因为许多书本&论坛&博客说直接将ext-4.xx复制进项目文件,我当时就很傻叉地照做了,直接导致Eclipse OOM的崩溃。后来通过一篇博客才了解到,官网文件需要裁剪后再复制进入项目再引用。
3、在项目中,同时引用了ext-all.js和bootstrap.js,这两者可以分别单独使用,但是一起引用会冲突。 脚本的内容可以通过bootstrap.js来自动添加,而样式则需要我们手动的来添加了,这句话我目前的理解是,可以通过bootstrap.js来控制其他js文件(例如ext-all.js)的引用。
4、明天梳理Ext文件依赖关系。
helloworld.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="ext-4.2/resources/css/ext-all.css">
<script type="text/javascript" src="ext-4.2/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="ext-4.2/bootstrap.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(
function(){Ext.MessageBox.alert("helloworld","hello World!");}
);
</script>
</body>
</html>
感谢
感谢起飞网的教程 —— [ ExtJS 4.2教程-01:Hello ExtJS - 起飞网 ]