JS判断包含
this.houseInfo.houseTypeName = '测试包含别墅'; if(this.houseInfo.houseTypeName.includes("别墅")){ alert("我包含别墅"); }else{ alert("我不包含别墅"); }
JS判断包含
this.houseInfo.houseTypeName = '测试包含别墅'; if(this.houseInfo.houseTypeName.includes("别墅")){ alert("我包含别墅"); }else{ alert("我不包含别墅"); }