如何在网站上搜索 [英] how to search in website

查看:121
本文介绍了如何在网站上搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好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.


这篇关于如何在网站上搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆