SOURCE

console 命令行工具 X clear

                    
>
console
var p =document.getElementsByTagName("p")[0];
p.onclick= function(){
  alert("aa")
}
<p>hahah</p>
p{
  color:red;
}