代码语言:javascript复制
var url =
var urls = ["a", "b","c","d"];
var isRequest = false;
try {
urls.forEach(function (value) {
if (url.indexOf(value) >= 0) {
isRequest = true;
throw new Error("end");
}
});
} catch(e) {}
if (isRequest) {
//TODO
}