FFan丶Blog / 部分JS效果 / / js判断当前域名后对应跳转

js判断当前域名后对应跳转

分类:部分JS效果 发布时间:2020-08-24 16:27:27来源:FFan丶Blog
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*/ }

猜你喜欢

  • 以下是以 m.二级域名绑定到子目录/m/为例的.htaccess代码. <IfModule mod_rewrite.c>

    SEO2020-01-15
  • 根目录新建.htaccess文件 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\\. RewriteCond %{HTTP_HOST} !^$

    SEO2020-01-15
  • 一、PC站所有页面跳转同一手机页面 function is_mobile() { var regex_match = /(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|

    部分JS效果2020-01-15
  • 快速把excel合并在一起,方便分析和统计可以利用excel表的宏计算就可以实现。方法如下: 1、我们需要把多个excel表都放在同一个文件夹里面,并在这个文件夹里面新建一个excel。

    其他2020-01-15
  • Copyright &#169; <script>var d=new Date();document.write(d.getFullYear());</script> FFan. All rights reserved.

    部分JS效果2020-01-15