JS Animated. 如何激活搜索插件
2014年11月24日
你好,本教程展示了如何在JS动画模板中激活搜索插件.
JS Animated. 如何激活搜索插件在某些情况下,您需要激活搜索插件在您的 website. 它允许用户查找所需的信息 website quickly.
Attention! 搜索功能将无法在本地工作. 它只对a有效 hosting-启用PHP的服务器.
使用表单所需的文件:
jquery.js – jQuery库 (此表格只适用于此版本的库);
search.css – stylesheet 用于搜索结果页面样式化的文件;
search.php -显示搜索结果的页面;
search.js – script 哪个负责在中输出搜索结果 iframe 在页面搜索中.php;
results.php – PHP script 实际执行搜索的是哪个.
为了激活搜索插件,你应该做以下步骤:
Copy search 文件夹到根目录 directory with your *.html files:
-
Move file search.php 从搜索文件夹到根目录 directory (with *.html files).
-
编辑表单以定义如下参数: action =“搜索.php” and method=”get”,也可以为输入设置参数: name=”s”:
如果您想更改搜索表单的名称 id=”search” 默认情况下,您应该在文件的第3行更改它 search.js,你可以在 search folder.
-
Copy partly header and footer 使用部分中所有连接的脚本 to the page search.php,但必须添加连接的文件 search.js. For example:
-
要显示搜索结果,请在内容中添加以下内容块:
Search result:
-
使用更改搜索结果的样式 search.css.
模板的所有其他主样式都将自动从文件中取出 style.css by the PHP script.
现在搜索插件被激活了.
请随时查看下面的详细视频教程:
JS Animated. 如何激活搜索插件