onselect 事件
定義和用法
onselect 事件會在文本框中的文本被選中時發生。
語法
HTML 中:
<element
onselect="SomeJavaScriptCode">
JavaScript 中:
object .onselect=function(){SomeJavaScriptCode}
参数 | 描述 |
---|---|
SomeJavaScriptCode | 必需。规定该事件发生时执行的 JavaScript。 |
瀏覽器支持
所有主要瀏覽器都支持onselect 事件
onselect 在HTML 中
onselect 屬性可用於: <input type="file">, <input type="password">, <input type="text">, <keygen>, 和<textarea>.
事件對象