开发者

Javascript to pre-select textarea on page load

I have a page that has a textarea, when the page is loaded, I want to pre-select the textarea(like twitter.com d开发者_JAVA技巧oes), so the user does not have to click on it. Do you know how to do that?

Previously thanks!

Rodrigo Alves Vieira.


$(document).ready(function() {
  $('#text-area-id').focus();
});

check here: http://jsfiddle.net/jxrS7/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜