div失去焦点事件_简述js中获取焦点事件

div失去焦点事件_简述js中获取焦点事件,第1张

div失去焦点事件_简述js中获取焦点事件 例 1.1 onblur和onfocus马克-to-win:onblur失去焦点和onfocus得到焦点事件。

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”><HTML><head><meta http-equiv=”content-type” content=”text/html; charset=utf-8″/><SCRIPT LANGUAGE=”JavaScript”><!–function check(a){var username = a.value;if (username == “”){/*String.fontcolor() (Method)Encapsulates the string within an <FONT COLOR=”…”> tag context.*/document.getElementById(“error”).innerHTML = “用户名不能为空!”.fontcolor(“red”);}}function rese(){document.getElementById(“error”).innerHTML = “”;}//–></SCRIPT></HEAD><BODY onload=”document.getElementById(‘u’).focus()”>

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/tougao/649009.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-17
下一篇 2022-04-17

发表评论

登录后才能评论

评论列表(0条)

保存