本文整理汇总了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'));
}