一键搜索多个搜索引擎

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

功能说明:

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站、抖音、无追、谷歌

相关文章
|
Linux C语言 C++
Linux ICMP协议实现:C/C++编程指南
ICMP(Internet Control Message Protocol)是网络通信中的重要协议,用于在IP网络中传递错误消息和诊断信息。在Linux系统中,我们可以使用C/C++编程语言来实现基本的ICMP功能,例如发送ICMP回显请求(Ping)和解析ICMP消息。本文将带您深入了解C/C++实现的ICMP协议,包括套接字编程、构造ICMP报文、发送和接收ICMP消息等,以及提供实际的代码示例。
1617 1
|
SQL 数据库
传递给数据库 'model' 中的日志扫描操作的日志扫描号无效
原文:传递给数据库 'model' 中的日志扫描操作的日志扫描号无效 状况描述:在服务器的管理中重新启动MSSQLSERVER启动后马上又停止   通过"事件查看器" 发现 错误: 9003,严重度: 20,状态: 1 LSN(5:324:1)无效。
3694 0
|
3月前
|
数据采集 人工智能 编解码
AI出码率70%+的背后:高德团队如何实现AI研发效率的量化与优化
本文系统阐述了在AI辅助编程快速发展的背景下,如何构建一套科学、可落地的研发效率量化指标体系
983 27
AI出码率70%+的背后:高德团队如何实现AI研发效率的量化与优化
|
29天前
|
自然语言处理 算法 安全
2025年TOP3最值得的AIGC创意视频服务推荐
本文深度测评2025年TOP级AIGC创意视频服务商:集之互动技术强、安全可靠,可灵操作便捷、适合多元创作,即梦艺术表现力出众。三大平台各具优势,助力企业高效打造高质量、高吸引力视频内容,赋能品牌传播。
213 2
|
监控 微服务 Python
微服务的故障恢复与弹性设计
【8月更文第29天】在微服务架构中,由于服务间的相互依赖,任何单点故障都可能导致整个系统崩溃。因此,设计具备高可用性和弹性的微服务系统至关重要。本文将探讨如何通过重试机制、断路器和超时设置等策略来增强系统的容错能力和恢复能力。
575 2
|
10月前
|
网络协议 Shell 网络安全
面试官想听的不仅是命令——如何结构化回答“容器无Shell时如何测试外网”?
“说说看,如果一个Pod的容器没有Shell,如何测试它能否访问外网?”
面试官想听的不仅是命令——如何结构化回答“容器无Shell时如何测试外网”?
|
Java 微服务 Spring
SpringBoot+Vue+Spring Cloud Alibaba 实现大型电商系统【分布式微服务实现】
文章介绍了如何利用Spring Cloud Alibaba快速构建大型电商系统的分布式微服务,包括服务限流降级等主要功能的实现,并通过注解和配置简化了Spring Cloud应用的接入和搭建过程。
SpringBoot+Vue+Spring Cloud Alibaba 实现大型电商系统【分布式微服务实现】
|
SQL XML 安全
Mybatis分页方式详解
Mybatis分页方式详解
1764 0
|
缓存 关系型数据库 MySQL
如何优化MySQL 8.0的性能?
【6月更文挑战第14天】如何优化MySQL 8.0的性能?
1865 5
|
存储 机器学习/深度学习 关系型数据库
mysql中char和varchar的区别
mysql中char和varchar的区别
503 1