事件会在键盘按键被松开时发生。
支持该事件的 HTML 标签:
<a>, <acronym>, <address>, <area>, <b>, <bdo>, <big>, <blockquote>, <body>,
<button>, <caption>, <cite>, <code>, <dd>, <del>, <dfn>, <div>, <dt>, <em>,
<fieldset>, <form>, <h1> to <h6>, <hr>, <i>, <input>, <kbd>, <label>, <legend>,
<li>, <map>, <object>, <ol>, <p>, <pre>, <q>, <samp>, <select>, <small>,
<span>, <strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>,
<th>, <thead>, <tr>, <tt>, <ul>, <var>
支持该事件的 JavaScript 对象:
document, image, link, textarea
例子:
<html> <head> <script type="text/javascript"> function toUpper(id) { var word=document.getElementById(id).value; document.getElementById(id).value=word.toUpperCase(); } </script> </head> <body> 输入的字符会被更改为大写: <input type="text" id="fname" onkeyup="toUpper(this.id)" /> </body> </html>
时间: 2024-10-08 00:21:12