對不起,我找不到在谷歌的教程,因爲我不知道該關鍵字...聲明如果有一個字符串和另一個字符串(做出列表)
var currentURL=location.href;
var str = currentURL;
if(str == "http://web.com/blabla" || str == "http://web.com/bleble"){
window.location = "http://web.com/ban";
} else {
}
如何使str == "http://web.com/blabla" || str == "http://web.com/bleble"
清單?所以如果我想再次輸入一些網址,我只需輸入網址到列表中。可以給我的代碼或鏈接教程?
[數組使用Javascript](http://www.w3schools.com/js/js_arrays.asp) –