English 中文(简体)
HTML 搜索函数
原标题:HTML Search Function
  • 时间:2012-05-22 02:46:54
  •  标签:
  • html
  • search

我需要一个内部网的搜索功能, 我可以只用 HTML 来做吗? 如果可以的话, 你可以指示我正确的方向, 我试着用Googel 来搜索它, 但它通过搜索引擎来搜索它。

干杯 干杯

我只需要搜索一页的文字,

最佳回答

您的“ 坚固” 需要某些服务器端脚本才能提供目录列表 。

我建议使用PHPs glob 函数循环,但可能有一个更好的选项。

编辑:

使用 JavaScript, 您可以获取所有元素的内容, 并使用 < a href=" http://www.w3schools.com/jsref/jsref_obj_regex.asp" rel="nofollow" >regex indexof 来确定文本中是否有字符串, 如果有的话, where .

如果您要使用 indexof 函数, 因为函数只返回字符串中 < strong> befirst 出现该字符串的索引, 您需要重复搜索, 直到您收集到所有事件 。

您可以指定 start 参数来剪切搜索区域前部, 在 < / em > 之后开始新的搜索 < em> 。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签