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);
});`
精彩评论