本文整理匯總了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;
}
}
示例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);
});
});
示例3:
clipboard.on("error", e => {
const node: HTMLElement = dom.byId(domID);
Tooltip.show(nlsHPCC.PressCtrlCToCopy, node);
on.once(node, mouse.leave, () => {
Tooltip.hide(node);
});
});
示例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;
}
}
示例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]);
}
}
}
示例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;
}
}
示例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;
}
}
示例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'));
}