提示搜索(jQuery)



我正在尝试自定义tipue搜索脚本。

当前脚本正在搜索整个HTML文件(包括元数据),并在搜索结果上触发误报。我想从Critera中消除元数据,或者仅允许脚本搜索特定的Div(即#PageWrap)。

这是当前脚本的链接:http://www.worldonecommunications.com/ndrill/tipuesearch/tipuesearch.js(第37-77行)

这些页面在单独的文件中被索引,但我认为问题在上面列出的文件中。

我认为您需要更改以下行:

var t_1 = html.toLowerCase().indexOf('<title>');
var t_2 = html.toLowerCase().indexOf('</title>', t_1 + 7);
...
var t_1 = html.toLowerCase().indexOf('<meta name="description"');
var t_2 = html.toLowerCase().indexOf('"', t_1 + 34);

我还搜索了一种如何修改该引擎以从页面主体产生的方式。

对于其他有兴趣的人:开发人员最终更新了搜索脚本以仅针对特定的DIV。可以从其网站下载更新的代码:http://www.tipue.com/search/

最新更新