Onblur事件-javascript基础教程
Onblur事件[removed] = initForm; function initForm() { var allTags = document.getElementsByTagName("*"); for (var i=0; i -1) { allTags[i].onblur = fieldCheck; } } } function fieldCheck() { if (this.value == "") { this.style.backgroundColor = "#FFFF99"; this.focus(); } else { this.style.backgroundColor = "#FFF"; } }
491.5KB
文件大小:
评论区