zoukankan      html  css  js  c++  java
  • JS改变网页标题,JS判断访问域名

    <script language="javascript" type="text/javascript">
    function loadFN(){
    hrefValue = window.location.href; //获取当前页面的地址
    //alert(hrefValue);
    alertUrls = ['gz.unkeji.com']; //指定你想要alert的域名,多个可以在数组中直接追加即可
    //追加如:['www.hugesky.com', 'hugesky.com', 'abc.hugesky.com']
    for(key in alertUrls){ 
    if(String(hrefValue).indexOf(alertUrls[key]) >= 0){
    //指定的字符串值alertUrls[key]在字符串href中出现则>=0,否则为-1
    alert( alertUrls[key] );
    break; //直接跳出循环
    } 
    }
    }
    document.title="广州物流公司,广州物流信息,广州货源,车源-友恩物流公司";
    
    </script>
  • 相关阅读:
    类和对象
    关联查询
    重点函数
    三大范式
    主外键
    软件开发的项目周期
    什么是事务
    索引
    视图
    数据库对象
  • 原文地址:https://www.cnblogs.com/wangchuang/p/3107308.html
Copyright © 2011-2022 走看看