一键搜索多个搜索引擎

简介: 一键搜索多个搜索引擎

功能说明:

1、并列展示常用的搜索引擎;
2、一键打开搜索页面,快人一步;
3、自动在浏览器一个新窗口中,一键打开多个目标网站,同时搜索;

一、并列展示常用搜索引擎

效果图:

在这里插入图片描述

源码

<html>

<head></head>
<title>聚合搜索</title>

<body>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <div>
        <form name="searchForm">
            <input id="input" name="searchInput" style="width:33%; height:30; font-size: 15px;"  type="text" value="" onchange ="search()" />
            <input id="input2"  type="text" value=""  style="display:none"/>
            <!-- <button type="button"  style="height:30; font-size: 15px;" onclick="search()">搜索</button> -->
            <button type="button"  style="height:30; font-size: 15px;" onclick="searchByWuzhui()">无追</button>
            <button type="button"  style="height:30; font-size: 15px;" onclick="searchByBaidu()">百度</button>
            <button type="button"  style="height:30; font-size: 15px;" onclick="searchByGoogle()">google</button>
            <button type="button"  style="height:30; font-size: 15px;" onclick="searchByStackoverflow()">stackoverfolw</button>
            <button type="button"  style="height:30; font-size: 15px;" onclick="searchByGithub()">github</button>
        </form>
    </div>
    <iframe id="biyin" src="https://cn.bing.com/?FORM=BEHPTB" width="33%" height="100%" style="float: left;"></iframe>
    <iframe id="kaifabaidu" src="https://kaifa.baidu.com/" width="33%" height="100%" style="float: left;" ></iframe>
    <iframe id="baidu" src="https://www.sogou.com" width="33%" height="100%" style="float: left;" ></iframe>

    <script>
          // 入口函数:从url中获取参数,进行第一次的自动搜索
          $(function(){
    
    
                $("#input").val(getUrlParam("q"));
                search();
           });

          // 光标定位到搜索输入框
           window.onload = function(){
    
    
                $('#input').focus();
            };
           function search(){
    
    
                {
    
    mathJaxContainer[0]}("#input").val());
                {
    
    mathJaxContainer[1]}("#input").val());
                {
    
    mathJaxContainer[2]}("#input").val());
           };
           function searchByWuzhui(){
    
    
            window.open("https://www.wuzhuiso.com/s?q=" + $("#input").val());
           };
           function searchByBaidu(){
    
    
            window.open("https://www.baidu.com/s?wd=" + $("#input").val());
           };
           function searchByGoogle(){
    
    
            window.open("https://www.google.com.hk/search?q=" + $("#input").val());
           };
           function searchByStackoverflow(){
    
    
            window.open("https://stackoverflow.com/search?q=" + $("#input").val());
           };
           function searchByGithub(){
    
    
            window.open("https://github.com/search?q=" + $("#input").val());
           };

           //获取url中的参数
          function getUrlParam(name) {
    
    
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return decodeURI(r[2]); return null; //返回参数值
          };

    </script>

</body>
</html>
`

设置浏览器地址栏输入内容回车一键搜索(可忽略)

举例:chrome浏览器
在这里插入图片描述

二、windows脚本:输入关键字直接打开目标网站的搜索页面

效果图

在这里插入图片描述

脚本代码(我用的是chrome浏览器)

新建文本文档,复制脚本内容后,修改文件后缀为 .bat 保存即可

set /p var=
start chrome gaode.com/search?query=%var%

三、一键打开多个搜索引擎(在新的浏览器窗口,独立标签页打开各个目标网站)

效果图

在这里插入图片描述

脚本代码

同上,在一个脚本里打开多个目标网站搜索页面即可,这个可以自行整理,分享一下我自用的一个脚本吧

set /p var=
start chrome -startup-window 

sc stop OracleOraDb10g_home1TNSListener
ping -n 2 127.0.0.1>nul
sc start OracleOraDb10g_home1TNSListener

start chrome -startup-window baidu.com/s?wd=%var%
start chrome bing.com/search?q=%var%
start chrome https://www.zhihu.com/search?q=%var%
start chrome https://search.bilibili.com/all?keyword=%var%
start chrome https://www.douyin.com/search/%var%
start chrome https://www.wuzhuiso.com/s?q=%var%
start chrome https://www.google.com.hk/search?q=%var%

其中依次是百度、必应、知乎、B站、抖音、无追、谷歌

相关文章
|
8天前
|
数据采集 存储 API
手动给docusaurus添加一个搜索
如果algolia不能自动配置的话,我教你手动给docusaurus添加一个搜索
手动给docusaurus添加一个搜索
|
9月前
|
数据采集 搜索推荐 安全
谷歌怎么搜索关键词?
答案是:使用搜索引擎,谷歌关键词规划工具,Ahrefs、SEMRush去搜索关键词等。 在今天的数字化时代,有效地使用谷歌搜索引擎对于找到所需信息至关重要。 掌握正确的关键词搜索技巧,可以帮助你更快、更准确地获取结果。 以下是一些常用的搜索技巧:
91 0
谷歌怎么搜索关键词?
|
10月前
|
数据采集 搜索推荐 安全
如何搜索谷歌SEO关键词?
答案是:可通过semrush或Google Search Console工具获取关键词来发外链。 理解谷歌SEO关键词的重要性 在进行谷歌SEO优化的过程中,关键词的选择与使用是非常关键的一步。 关键词能够引导Google爬虫正确理解网站内容,提高搜索结果的相关性,从而提升网站的排名。 关键词的作用 正确使用关键词可以帮助你的网站在谷歌搜索引擎中获得更高的排名,吸引更多的目标用户,提升你的业务成果。 如何进行关键词搜索 谷歌关键词的搜索并非一件难事,但是需要一些特定的技巧和工具。
83 0
如何搜索谷歌SEO关键词?
|
10月前
|
数据采集 搜索推荐 安全
谷歌SEO如何搜索关键词?
答案是:可通过semrush或Google Search Console工具获取关键词来发外链。 了解您的业务和目标受众 首先,理解自己的业务特性和目标受众是关键。明确自己的产品或服务特色,同时探寻目标受众的需求和搜索习惯。 业务特点 对你的产品或服务进行深入的分析,找出可能吸引目标受众的元素。 目标受众 理解目标受众的特性和兴趣,这有助于找到最具吸引力的关键词。
75 1
谷歌SEO如何搜索关键词?
|
数据采集 搜索推荐 前端开发
11、搜索服务
根据分类、关键字匹配课程名称,课程内容、难度等级搜索,搜索方式为全文搜索,搜索节点分页显示。
66 0
|
搜索推荐 安全 Java
搜索
搜索
83 0
|
搜索推荐
再见,百度搜索!
“广告、垃圾信息、水文....什么都有,就是没有想要的答案!”
再见,百度搜索!
|
存储 缓存 自然语言处理
一切为了搜索
Elasticsearch是​ 基于Lucene搜索架构的一个分布式、RESTful 风格的搜索和数据分析引擎
|
机器学习/深度学习 算法 搜索推荐
DARTS+:DARTS 搜索为何需要早停?
近日,华为诺亚 方舟实验室的作者们提出一种可微分的神经网络架构搜索算法 DARTS+,将早停机制(early stopping)引入到原始的 DARTS[1] 算法中,不仅减小了 DARTS 搜索的时间,而且极大地提升了 DARTS 的性能。相关论文《DARTS+: Improved Differentiable Architecture Search with Early Stopping》已经公开(相关代码稍后也会开源)。
190 0
DARTS+:DARTS 搜索为何需要早停?

热门文章

最新文章