点击一个input依次触发的事件
效果演示
最后点击!
代码演示
<!DOCTYPE html>
<html>
<head>
<meta charset="{CHARSET}">
<title></title>
</head>
<body>
<input type="" name="text" id="text" value="" />
<script type="text/javascript">
const text = document.getElementById('text');
text.onclick = function (e) {
console.log('onclick')
}
text.onfocus = function(e) {
console.log('onfocus')
}
text.onmousedown = function(e) {
console.log('onmousedown')
}
text.onmouseenter = function(e) {
console.log('onmouseenter')
}
</script>
</body>
</html>