2016-03-18 23 views

回答

0

我認爲這樣做最簡單的方法是:

var oldHref = window.location.href; 
if(str.endsWith("eng")){ 
    var newHref = oldHref .replace("eng", "rus"); 
}else{ 
    console.log("Error in Script") 
} 

迎接

亞歷