posts - 431,  comments - 344,  trackbacks - 0
FormUtil.setTextboxes = function() {
   var colInputs = document.getElementsByTagName("input");
   var colTextAreas = document.getElementsByTagName("textarea");
 
   for (var i = 0; i < colInputs.length; i++) {
      if (colInputs[i].type == "text" || colInputs[i].type == "password") {
         colInputs[i].onfocus = function() {this.select();};
      }
   }
   for (var i = 0; i < colTextAreas.length; i++) {
      colTextAreas[i].onfocus = function() {this.select();};
   }
}
posted on 2008-01-24 09:58 周锐 阅读(508) 评论(0)  编辑  收藏 所属分类: HTMLJavaScript

只有注册用户登录后才能发表评论。


网站导航: