if(location.toString().indexOf("abc.com") <= -1) /*如果当前网址中没有abc.com*/ { document.location.href="/b.htm"; /*跳转到b.htm*/ } else...
if(location.toString().indexOf("abc.com") <= -1) /*如果当前网址中没有abc.com*/
{
document.location.href="/b.htm"; /*跳转到b.htm*/
}
else
{
document.location.href="/a.htm"; /*有的话,跳转到a.htm*/ }