如何调用百度搜索引擎

我有一个自己设计的网页,在里面有一个搜索框,请问如何才能让搜索框调用百度搜索引擎,在我的搜索框里输入搜索百度的内容。

https://www.baidu.com/s?wd=你文本框传入的内容

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>
            div{
                display: inline;
                background-color: #00FFFF;
            }
        </style>
    </head>
    <body>
        <input value="" name="baidu" id="baidu" /><div onclick="baidu()">百度一下</div>
    </body>
    <script>
        function baidu(){
            var inputword=document.getElementById("baidu").value;
            location.href="https://www.baidu.com/s?wd="+inputword;
        }
    </script>
</html>