Warning: Undefined array key "adf" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42

几行代码实现谷歌百度搜索对比


Warning: Undefined array key "adf" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42

想写一个谷歌百度搜索结果对比的工具,发现谷歌无法套用框架,于是简单写了个弹窗对比,需要的可以试试

 

HTML代码:

 

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>谷百对比</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $(".btn").click(function(event) {
            var w = window.screen.availWidth
            var h = window.screen.availHeight;
            var p = $(".p").val();
            window.open("https://www.google.com/search?hl=zh&q=" + p, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=" + w / 2 + ",left=" + w / 2 + ", height=" + h);
            window.open("https://www.baidu.com/s?ie=utf-8&word=" + p, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=" + w / 2 + ",left=0, height=" + h);
        });
    });
    </script>
</head>

<body>
    <input class="p" type="text" value="" placeholder="谷歌百度对比搜索">
    <input class="btn" type="button" value="点击搜索">
</body>

</html>

 

demo:

 

点击查看>>

 

 

/www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 41

Warning: Undefined array key "sim_pages" in /www/wwwroot/blog.5iux.cn/wp-content/plugins/rejected-wp-keyword-link-rejected/wp_similarity.php on line 42
想写一个谷歌百度搜索结果对比的工具,发现谷歌无法套用框架,于是简单写了个弹窗对比,需要的可以试试   HTML代码:   <!DOCTYPE html> <html lang="en"> <head> <meta……" target="_blank">

D.Young

85后 / 代码散修 / 平面设计 / 一个老父亲 / 直男 / 被认为胖

相关推荐

发表评论

您的电子邮箱地址不会被公开。

微信扫一扫,分享到朋友圈

几行代码实现谷歌百度搜索对比
返回顶部

显示

忘记密码?

显示

显示

获取验证码

Close