键盘鼠标移入移出
作者:互联网
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<input type="text" onm ouseout="f2()" onm ouseover="f1()" onkeydown="f3()" onkeyup="f4()"/>
<script>
function f1() {
console.log("鼠标移入了...")
}
function f2() {
console.log("鼠标移出了...")
}
function f3() {
console.log("键盘按下了...")
}
function f4() {
console.log("键盘弹起了...")
}
</script>
</body>
</html>
标签:function,...,console,鼠标,移出,键盘,log 来源: https://www.cnblogs.com/guobabiancheng/p/16191733.html