サイトまたは任意のサイトから focus() の回答を簡単に見つけることができます..しかし、私が知りたいのは、入力ボックス内に挿入したばかりの後にフォーカスを使用するにはどうすればよいかということです。
$("input").val('@user').focus(); // this goes to start of the input box and foucs from start, but i want it to focus after the @user
$("input").val('@user today i did new things').focus(5); // i added 5 in focus method, obviously its not supported yet!, but the idea behind is, to focus it after @user from complete word.
編集:
Firefoxでは正常に動作することを見ましたが、クロムではカーソルを最初から開始します。解決策はありますか?