这个代码属于
客户端
服务器端
$("#click").click(function(e){
console.log('click');
})
你会把它放在你的
index.html
. (或在您的
索引.html
<!doctype html>
<html>
<head>
<title>Express - Jquery</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<button id="click" type="button">Click</button>
</body>
<script type="text/javascript">
$("#click").click(function(e){
console.log('click');
});
</script>
</html>