【JS】获取一段HTML中img的src

const regExp = /]+src=['"]([^'"]+)['"]+/g;
const result = [];
let temp;
while ((temp = regExp.exec(html)) != null) {
	result.push(temp[1]);
}

你可能感兴趣的:(javascript,vue.js,开发语言)