<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="a">abc</div>
<button id="test">test</button>
<script>
function fn(){
alert("hello")
}
document.getElementById("test").addEventListener("click",()=>alert("hello"))
</script>
</body>
</html>
网友评论