开发者

the (at) sign to look up username in textarea

Does anyone know of any js (jquery) library that react to the @ sign when you are writing 开发者_JAVA百科in a textarea and does a json lookup, similiar to what Facebook does in the status box? I'm not looking for autocomplete for input boxes.


You might consider trying to register a keyhandler on your page/input that could listen for an @ sign, then act as more characters are typed in.


$('#MainContent_TextBox1').keydown(function (event) {
            if (event.shiftKey && event.keyCode == 50)
                //Go find $('#MainContent_TextBox1').val() in the DB
                //Then $('#MainContent_TextBox1').val(search-result);
         });`
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜