zoukankan      html  css  js  c++  java
  • 来源为搜索时,提示并收藏

    var referer = document.referrer;
    if(referer.indexOf("google")>0)
    {if(confirm('感谢您使用 Google 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("sina")>0)
    {if(confirm('感谢您使用 新浪 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("baidu")>0)
    {if(confirm('感谢您使用 百度 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("3721")>0)
    {if(confirm('感谢您使用 3721 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("114")>0)
    {if(confirm('感谢您使用 114 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("sogou")>0)
    {if(confirm('感谢您使用 搜狗 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("sohu")>0)
    {if(confirm('感谢您使用 搜狐 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("163")>0)
    {if(confirm('感谢您使用 网易 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    if(referer.indexOf("yahoo")>0)
    {if(confirm('感谢您使用 雅虎 搜索引擎服务,点击\'确认\'进入该网站并收藏您找到的重要信息.')){addToFavorite();}}
    function addToFavorite(){
      if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
        window.external.AddFavorite("http://www.f996.com", unescape('重要信息'));
  • 相关阅读:
    基于概率论的分类方法:朴素贝叶斯
    【目录】机器学习 笔记
    决策树原理及分类实战
    k-近邻算法实现“电影、约会网站、手写数字识别”分类
    多线程互斥锁、读写锁
    21.快速排序实现(快排)
    系统架构资料收集
    20.排序之冒泡、直插、希尔排序方法
    19.散列表(哈希表)查找
    18.平衡二叉树(AVL树)、多路树查找(B树)概念
  • 原文地址:https://www.cnblogs.com/MaxIE/p/669437.html
Copyright © 2011-2022 走看看