HTML / Javascript only recursive search?

时间:2016-04-04 16:46:21

标签: javascript

I posted on a wishlist of a JS library that I wish their documentation search included results from more than just the titles of the pages. After I posted I realized that that may be difficult since when users download it from Github and use the docs on their local machine there is no server side code that will run such as PHP that could traverse the filesystem and parse all the results into an array, but before I just assume that there isn't a way to do it I thought I would ask.

When you look at this link: http://threejs.org/docs/index.html#Manual/Introduction/Creating_a_scene

If you type in anything that isn't part of the list on the left, it won't show up, such as if you type in goal nothing shows even though in the first sentence it says The goal of this section. Is there a way to put together a JS search that would traverse all the files that are on the list put the text into an array that could be searched without server side code?

I know Jquery would probably make the job easier, but I doubt he would include that in his repository, so as plain vanilla JS as possible would be preferred.

0 个答案:

没有答案