开发者

how to achieve autocomplete in html?

I have this code <input type="text" value="destroy" AUTOCOMPLETE="on" /> to enab开发者_JAVA技巧le autocomplete, but it is not working.

Can u tell me any suggestions?


Auto complete is browser based and should be turned on by default. But usually they only store values that were submitted.

BTW here's an old SO post about autocomplete (just for fun)


Depends what you are trying to achieve. The autocomplete you used serves to offer user a choice from what the user himself typed before.

If you want autocomplete such like search engines have, where user is suggested a number of choices he never typed, then you need to use javascript, and also store somewhere data with autocomplete suggestions.

Here's an example:

http://www.pengoworks.com/workshop/jquery/autocomplete.htm


AUTOCOMPLETE="on"

This property is only used by Microsoft Internet Explorer and the default is on. You should only use it to turn it off. If the user turns it off in their browser you can't use it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜