最新动态
获取搜索引擎关键字的方法
2024-11-07 20:10

if (refer != '') {

获取搜索引擎关键字的方法

domain = refer.match(/http://www.([^/]+)//)[1];

var kwArr = [{ "dm": "so.com", "kw": "q", "name": "360" }, { "dm": "google.com.hk", "kw": "q", "name": "谷歌香港" }, { "dm": "baidu.com", "kw": "wd|word", "name": "百度" }, { "dm": "soso.com", "kw": "w", "name": "搜搜" }, { "dm": "yahoo.com", "kw": "q", "name": "雅虎" }, { "dm": "bing.com", "kw": "q", "name": "bing" }, { "dm": "sogou.com", "kw": "query", "name": "搜狗" }, { "dm": "youdao.com", "kw": "q", "name": "有道"}];

for (var item in kwArr) {

var $dm = kwArr[item].dm;

var $kw = kwArr[item].kw;

var $name = kwArr[item].name; if (domain == $dm) {

eval("var reg = /[?&](" + $kw + ")=(.+?)(&|$)/ig;");

var keywordCollection = reg.exec(refer);

while (keywordCollection != null) {

keyword = RegExp.$2 + ",";

keywordCollection = reg.exec(refer);

} if (keyword != '') {

keyword = keyword.substring(0, keyword.length - 1);

} channel = $name; userkeyword = decodeURI(keyword);

}

}

    以上就是本篇文章【获取搜索引擎关键字的方法】的全部内容了,欢迎阅览 ! 文章地址:http://zleialh.tongchengxian.cn/quote/208.html 
     行业      资讯      企业新闻      行情      企业黄页      同类资讯      网站地图      返回首页 通成线资讯移动站 http://zleialh.tongchengxian.cn/mobile/ , 查看更多   
发表评论
0评