如何在网站上搜索

问题描述:

您好b $ b

我想在我的网站上实现搜索内容。

我添加了JavaScript代码,但它触发了索引页面。





请有人帮我这个。



我在html中添加了这段代码

Hi
I want to implement search content in my website.
I added JavaScript code but its triggering to index page.


Please anyone help me on this.

I added this code in html

<div class="search-box">
    <div id="sb-search" class="sb-search">
        <form>
            <input class="sb-search-input" placeholder="Enter your search term..."

                    type="search" name="search" id="search">
            <input class="sb-search-submit" type="submit" value="">
            <span class="sb-icon-search"> </span>
        </form>
    </div>
</div>









并在JavaScript中添加这个





and added this in JavaScript

<script src="js/classie.js"></script>
<script src="js/uisearch.js"></script>
<script>
    new UISearch( document.getElementById( 'sb-search' ) );
</script>





因为我在html网站上工作。请帮助我。



As i am working new in html website. Please help me.

使用Google搜索到您的搜索链接。您可以使用为您的网站创建自定义Google搜索,然后将其粘贴到您要包含的每个网页上搜索框,当然在div标签内。​​
use Google's search to your search link. You can use this to create a custom google's search for your website and then paste it on every page you want to include the search box, inside the div tags of course.