當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript dom.byId函數代碼示例

本文整理匯總了TypeScript中dojo/dom.byId函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript byId函數的具體用法?TypeScript byId怎麽用?TypeScript byId使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了byId函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: passwordEqualValidate

 private passwordEqualValidate(passwordNodeId, passwordAginNodeId) {
     let passwordNode: any = dom.byId(passwordNodeId);
     let passwordAginNode: any = dom.byId(passwordAginNodeId);
     if(passwordNode === null || passwordAginNode === null) {
         return true;
     } else {
         let result =  passwordNode.value === passwordAginNode.value;
         if(!result) {
             this.refuseHandle(passwordNode);
             this.refuseHandle(passwordAginNode);
         }
         return result;
     }
 }
開發者ID:qinqin65,項目名稱:QuickFinance,代碼行數:14,代碼來源:validate.ts

示例2:

 clipboard.on("error", e => {
     const node: HTMLElement = dom.byId(domID);
     Tooltip.show("Press ctrl+c to copy.", node);
     on.once(node, mouse.leave, () => {
         Tooltip.hide(node);
     });
 });
開發者ID:GordonSmith,項目名稱:HPCC-Platform,代碼行數:7,代碼來源:Clippy.ts

示例3:

 clipboard.on("error", e => {
     const node: HTMLElement = dom.byId(domID);
     Tooltip.show(nlsHPCC.PressCtrlCToCopy, node);
     on.once(node, mouse.leave, () => {
         Tooltip.hide(node);
     });
 });
開發者ID:AttilaVamos,項目名稱:HPCC-Platform,代碼行數:7,代碼來源:Clippy.ts

示例4: neededvalidate

 private neededvalidate(nodeId): boolean {
     let node: any = dom.byId(nodeId);
     if(node === null) {
         return true;
     } else if(node.value) {
         return true;
     } else {
         this.refuseHandle(node);
         return false;
     }
 }
開發者ID:qinqin65,項目名稱:QuickFinance,代碼行數:11,代碼來源:validate.ts

示例5: function

 showDebugInfo: function (/*DOMNode|String*/ node, obj) {
     var domNode = dom.byId(node);
     if (!obj) {
         obj = this;
     }
     var ulNode = domConstruct.create("ul", {}, domNode);
     for (var key in obj) {
         if (obj.hasOwnProperty(key)) {
             this.showDebugRow(ulNode, key, obj[key]);
         }
     }
 }
開發者ID:AttilaVamos,項目名稱:HPCC-Platform,代碼行數:12,代碼來源:ESPResource.ts

示例6: passwordLengthValidate

 private passwordLengthValidate(nodeId) {
     let node: any = dom.byId(nodeId);
     if(node === null) {
         return true;
     } else {
         let result: boolean = true;
         if(node.value.length < Config.passwordMinLength) {
             result = false;
             this.refuseHandle(node);
         }
         return result;
     } 
 }
開發者ID:qinqin65,項目名稱:QuickFinance,代碼行數:13,代碼來源:validate.ts

示例7: emailValidate

 private emailValidate(nodeId): boolean {
     let node: any = dom.byId(nodeId);
     if(node === null || node.value == '') {
         return true;
     } else {
         let emailReg = new RegExp(/.+@.+\..+/);
         let result = emailReg.test(node.value);
         if(!result) {
             this.refuseHandle(node);
         }
         return result;
     } 
 }
開發者ID:qinqin65,項目名稱:QuickFinance,代碼行數:13,代碼來源:validate.ts

示例8: init

function init() {

	console.log('initializing');

	// Preferred over parseOnLoad
	// https://dojotoolkit.org/documentation/tutorials/1.10/declarative/#instantiating-objects
	parser.parse();

	arr.forEach([0, 1, 2], num => {
		console.log('num: ' + num);
	});

	console.log(user);
	domConstruct.place(`<span>${greeter(user)}</span>`, dom.byId('greeting'));

}
開發者ID:rebolyte,項目名稱:dojo1-typescript,代碼行數:16,代碼來源:main.ts


注:本文中的dojo/dom.byId函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。