JavaScript 中的 onkeyup 事件是什么?
当按键释放时会触发 onkeyup 事件。
示例
你可以尝试运行以下代码以了解如何在 JavaScript 中使用 onkeyup 事件 −
<html>
<head>
<script>
<!--
function sayHello() {
var str = document.getElementById("subject");
str.value = str.value.toLowerCase();
}
//-->
</script>
</head>
<body>
<p>Enter subject below in upper case and see what happpens.</p>
<input type = "text" onkeyup = "sayHello()" id = "subject">
</body>
</html>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP