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
周銳 閱讀(537)
評論(0) 編輯 收藏 所屬分類:
HTML 、
JavaScript