onblur ʼþ

¶¨ÒåºÍÓ÷¨

onblur ʼþ»áÔÚ¶ÔÏóʧȥ½¹µãʱ·¢Éú¡£

Óï·¨

onblur="SomeJavaScriptCode"
²ÎÊý ÃèÊö
SomeJavaScriptCode ±ØÐè¡£¹æ¶¨¸Ãʼþ·¢ÉúʱִÐÐµÄ JavaScript¡£

Ö§³Ö¸ÃʼþµÄ HTML ±êÇ©£º

<a>, <acronym>, <address>, <area>, <b>, <bdo>, <big>, <blockquote>, 
<button>, <caption>, <cite>, <dd>, <del>, <dfn>, <div>, <dl>, <dt>, 
<em>, <fieldset>, <form>, <frame>, <frameset>, <h1> to <h6>, <hr>, <i>, 
<iframe>, <img>, <input>, <ins>, <kbd>, <label>, <legend>, <li>, 
<object>, <ol>, <p>, <pre>, <q>, <samp>, <select>, <small>, <span>, 
<strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, 
<th>, <thead>, <tr>, <tt>, <ul>, <var>

Ö§³Ö¸ÃʼþµÄ JavaScript ¶ÔÏó£º

button, checkbox, fileUpload, layer, frame, password, 
radio, reset, submit, text, textarea, window

ʵÀý 1

ÔÚ±¾ÀýÖУ¬ÎÒÃǽ«ÔÚÓû§À뿪ÊäÈë¿òʱִÐÐ JavaScript ´úÂ룺

<html>
<head>
<script type="text/javascript">
function upperCase()
{
var x=document.getElementById("fname").value
document.getElementById("fname").value=x.toUpperCase()
}
</script>
</head>

<body>

ÊäÈëÄúµÄÐÕÃû£º
<input type="text" id="fname" onblur="upperCase()" />

</body>
</html>

Êä³ö£º

ÊäÈëÄúµÄÐÕÃû£º

TIY

onblur
ÈçºÎʹÓà onblur ʼþÔÚÓû§À뿪ÊäÈë¿òʱִÐÐ JavaScript ´úÂë
VUE