<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"> function createDojoDateBox(inputId) { var inputObj = dojo.byId(inputId); inputObj.setAttribute("dojoType","dijit.form.DateTextBox"); dojo.parser.instantiate([inputObj]); } function createDojoTextBox(inputId) { var inputObj = dojo.byId(inputId); inputObj.setAttribute("dojoType","dijit.form.TextBox"); dojo.parser.instantiate([inputObj]); } function createDojoValidationTextBoxForEmail(inputId){ var inputObj = dojo.byId(inputId); inputObj.setAttribute("dojoType","dijit.form.ValidationTextBox"); inputObj.setAttribute("promptMessage","请输入 Email 地址"); inputObj.setAttribute("invalidMessage","请输入正确格式的 Email"); inputObj.setAttribute("required","true"); inputObj.setAttribute("trim","true"); inputObj.setAttribute("regExp", "^[A-Za-z0-9](([_.-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+) (([.-]?[a-zA-Z0-9]+)*).([A-Za-z]{2,})$"); dojo.parser.instantiate([inputObj]); } </script> <body class="tundra"> <h1 class="testTitle"> 雇员信息 </h1><br /> <div> <label> 编号:</label> <input type="text"id="eid"οnfοcus="createDojoTextBox('eid')"value="51246"/><br /> <label> 姓名:</label> <input type="text"id="ename"οnfοcus="createDojoTextBox ('ename')"value="ThinkVision"/><br /> <label> 职务:</label> <input type="text"id="duty"οnfοcus="createDojoTextBox('duty')"value="工程师"/> <br /> <label> 电子邮箱:</label> <input type="text"id="email"οnfοcus="createDojoValidationTextBoxForEmail ('email')"value="think@cn.ibm.com"/><br /> <label> 入职时间:</label> <input type="text"id="onboard"οnfοcus="createDojoDateBox ('onboard')"value="09-04-29"/><br /> </div>
初始化 ODJO
最新推荐文章于 2024-11-11 19:29:13 发布