Dojo 控件性能优化最佳实践
2010-03-09 00:00:00 来源:WEB开发网清单 6. 使用编程方式初始化 Dojo 控件性能测试
<script djConfig="parseOnLoad: true, isDebug: true, locale:'zh-cn'"
src="<%=Context%>/javascript/dojo/dojo.js" ></script>
<style type="text/css">
@import "<%=Context%>/javascript/dijit/themes/tundra/tundra.css";
@import "<%=Context%>/javascript/dojo/resources/dojo.css";
</style>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.form.DateTextBox");
dojo.require("dijit.form.TextBox");
dojo.require("dijit.form.ValidationTextBox");
</script>
<body class="tundra">
<h1 class="testTitle"> 雇员信息 </h1><br />
<div>
<label> 编号:</label>
<input type="text" id="eid"/>
<script type="text/javascript">
new dijit.form.TextBox({"id":"eidDojo","value":"51246"}, dojo.byId("eid"));
</script>
<br />
<label> 姓名:</label>
<input type="text" id="ename"/>
<script type="text/javascript">
new dijit.form.TextBox({"id":"enameDojo","value":"ThinkVision"
}, dojo.byId("ename"));
</script><br />
<label> 职务:</label>
<input type="text" id="duty"/>
<script type="text/javascript">
new dijit.form.TextBox({"id":"dutyDojo","value":"工程师"dojo.byId("duty"));
</script><br />
<label> 电子邮箱:</label>
<input type="text" id="email"/>
<script type="text/javascript">
new dijit.form.ValidationTextBox({"id":"emailDojo","value":"think@cn.ibm.com",
"promptMessage":"请输入 Email 地址", "invalidMessage":"请输入正确格式的 Email ",
"required":"true","trim":"true","regExp":"^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)
@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$"}, dojo.byId("email"));
</script><br />
<label> 入职时间:</label>
<input type="text" id="onboard"/>
<script type="text/javascript">
new dijit.form.DateTextBox({"id":"onboardDojo",
"value":dojo.date.locale.parse("2009-4-22",{selector:"date"})},dojo.byId("onboard"
));
</script><br />
</div>
- ››控件一:Gallery 之无限循环的问题
- ››控件一:Gallery 之基础用法
- ››性能自检Win7快速提高系统性能3技巧
- ››Dojo QuickStart 快速入门教程 (4) 简单的测试框架...
- ››Dojo QuickStart 快速入门教程 (5) 使用数组
- ››Dojo QuickStart Guide 快速入门 Why Dojo
- ››Dojo Quick Start Guide 快速入门 (2) 基本框架
- ››Dojo QuickStart 快速入门教程 (3) 选择器
- ››Dojo Javascript 编程规范 [1]
- ››Dojo Javascript 编程规范 [2]
- ››Dojo Javascript 编程规范 [3]
- ››Dojo Javascript 编程规范 [4]
更多精彩
赞助商链接