, <q>, <samp>, <select>, <small>, <span>, <br>
<strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <br>
<th>, <thead>, <tr>, <tt>, <ul>, <var>
<p><strong>支持该事件的 JavaScript 对象:</strong></p>
<p>button, checkbox, fileUpload, layer, frame, password, <br>
radio, reset, submit, text, textarea, window</p>
<p>例子:在用户离开输入框时执行 JavaScript 代码:<br>
</p>
<div class="codetitle">
<span><a style="CURSOR: pointer" data="4541" class="copybut" id="copybut4541" onclick="doCopy('code4541')"><u>复制代码</u></a></span> 代码如下:</div>
<div class="codebody" id="code4541">
<br>
<br>
<script type="text/javascript"><br />
function upperCase()<br />
{<br />
var x=document.getElementById("fname").value<br />
document.getElementById("fname").value=x.toUpperCase()<br />
}<br />
</script><br>
<br>
<p>输入您的姓名:<br>
<input type="text" id="fname" onblur="upperCase()"></p>
<p><br>
</p>
</div>
<p>希望本文所述对大家的javascript程序设计有所帮助。</p>
</var>
</ul></tt>
</tr>
</thead>
</th>
</tfoot></textarea>
</td>
</tbody>
</table></sup></sub></strong></span></small></select></samp></q>
登录后复制