开发者

JavaScript dialog box / context menu for text areas

I am working on a project at the moment that requires a dialog box or context menu to display when the text in the box matches a certain regex pattern.

For example, if I was to type @user into the text area, a dialog box would show up where the cursor is or just below the typed word containing Ajax generated list of possible matched user names.

Are there any J开发者_C百科avaScript packages (preferably a jQuery add-on) that will do this kind of functionality?


I think what you are looking for is a jQuery autocomplete plugin. Here is a site that lists 10 of them: http://webtecker.com/2008/03/10/10-auto-complete-ajax-scripts/

(Disclaimer: I have no relationship with this site.)


You can try this: http://docs.jquery.com/Plugins/Autocomplete

You might have to tweak it to match your requirements, but some of the basic functionality is there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜