1 var str = "测试区域(0/0)"; 2 var pos = obj.name.indexOf('('); 3 str = str.substring(0,pos); //str = '测试区域'