`
duzhangtech
  • 浏览: 5935 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

JS 小技巧:载页面的时候自动选择一端文字,方便用户

    博客分类:
  • JS
阅读更多


<script type="text/javascript">
window.onload = function(){
  var text_input = document.getElementById ('myTextInput');
  text_input.focus ();
  text_input.select ();
}
</script>

self-explanatory 不解释了
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics