WEB开发网
开发学院网页设计JavaScript Dojo 控件性能优化最佳实践 阅读

Dojo 控件性能优化最佳实践

 2010-03-09 00:00:00 来源:WEB开发网   
核心提示: 清单 6. 使用编程方式初始化 Dojo 控件性能测试<scriptdjConfig="parseOnLoad:true,isDebug:true,locale:'zh-cn'"src="<%=Context%>/javascrip

清单 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> 

上一页  5 6 7 8 9 10 

Tags:Dojo 控件 性能

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接