<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>



  </style>

</head>
<body>
  


<button id="btn">按钮</button>





  
<a href="https://xn--xu0a.cn" id="link">维洛书签-羽.cn</a>





<script>

var btn = document.getElementById("btn");
btn.onclick = function(event){

console.log(event.target);
event.target.innerHTML  =  "点击之后";
console.log('该按钮事件为:'+event.type);

};






var link = document.getElementById("link");

link.onclick = function(e){

  console.log("点击了");
e.preventDefault();

};










</script>






</body>
</html>