I have files "a.txt", "b.txt", "c.txt", ... Every file contain translation for words.
English-Russian, it seems like:
able 'eibl способный
about x'baut приблизительно; о
above q'bAv над, выше

Is it possible to realize live search in this dictionary just by AJAX (without PHP or something else) ? If possible, could you explain please? Some example will be very helpful.

Thanks all in advance.

有帮助吗?

解决方案

Sure it's possible. Anything's possible if you just believe!

Use your AJAX to call the txt file from your server, then use the .search("some word"); method to find what you need.

This is an aweful solution though because the user will have to download the entire text file, and your client side code will have to parse the entire text to find what you're looking for.

You're much better off using PHP/MySQL.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top