js util字串包含
阿新 • • 發佈:2019-01-11
/js方法相關方法總結
//樹選擇,需選擇到子節點
function check() {
var node2 = $('#tree').tree('getSelected');
if (node2 != null) {
var l = node2.attributes.l;
if (l != "2") {//一級 電壓等級
$.messager.alert("系統提示", "請選擇試卷系統編號統計!", "info");
return ;
}
var childrens = $(this).tree("getChildren", node2.target);
if (childrens.length != 0) {
return false;
}
else {
//console.log(node2.id);
return node2.id;
}
}
}
// 使用 if(data.te_status!="0"&&(!isContains((data.te_hasuser),'${loginUser.su_id}')))
function isContains(str, substr) {
return new RegExp(substr).test(str);
}