var siteList = { s001: "listco/" }; var navSite = [ { index: "s001", key: "" } ]; function getRealUrl(hrefValue) { for (var i = 0; i < navSite.length; i++) { if (hrefValue == navSite[i].key || hrefValue == navSite[i].key + "index.shtml") { var index = navSite[i].index; var url = siteList[index]; break; } else { url = siteList.s001; } } return url; } function loadFN() { var hrefValue = window.location.href; //获取当前访问地址 if (hrefValue.indexOf('://portal.sinopec.com/') < 0) { window.location.href = getRealUrl(hrefValue); } } window.onload = loadFN; ​​​​​​​​​​​​​​
博评网