|
if (fProTeamMember.indexOf(",") > -1) {
var ids = fProTeamMember.split(",");
for (var i = 0; i < ids.length; i++) {
bizData5.setFilter("name_filter", "sName='" + ids + "'");
bizData5.refreshData();
bizData5.setValue("fCurrentProjectName", projectName);
var reg = RegExp(projectName);
if (bizData5.getValue("fjoinProName").match(reg)) {
alert(1);
}else{
alert(bizData5.getValue("fjoinProName"));
bizData5.setValue("fjoinProName",
bizData5.getValue("fjoinProName") === null || bizData5.getValue("fjoinProName") === undefined || bizData5.getValue("fjoinProName") === "" ? projectName : bizData5
.getValue("fjoinProName")
+ "/" + projectName);
bizData5.saveData();
}
}
}
如果包含alert(1)可以弹出来,如果不包含浏览器报错:Cannot read property 'match' of undefined
用indexOf 也是同样的包含可以进方法,不包含报错
|
|