SOURCE

console 命令行工具 X clear

                    
>
console
function alertSecond()
{
    alert("第二次");
}
window.onload=function()
{
    var oBtn=document.getElementById("btn");

    oBtn.onclick=function()
    {
        alert("第一次");
    }
     oBtn.onclick=function()
    {
        alert("第一次");
    }
     oBtn.onclick=function()
    {
        alert("第一次");
    }
     oBtn.onclick=function()
    {
        alert("第一次");
        alert("第二次");
        alert("第三次");
    }
 oBtn.onclick=function()
    {
        alert("第一次");
        alert("第三次");
    }

    var oListenBtn=document.getElementById("ListenBtn");

    oListenBtn.addEventListener("click",function()
    {
        alert("第一次");
    },false);

    oListenBtn.addEventListener("click",alertSecond,false);

    oListenBtn.addEventListener("click",function()
    {
        alert("第三次");
    },false);

    oListenBtn.removeEventListener("click",alertSecond,false);
}
<!DOCTYPE html> 
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <script>
      
    </script>
</head>
<body>
    <input id="btn" type="button" value="按钮"/>
    <br/>
    <br/>
    <input id="listenBtn" type="button" value="监听按钮"/>

    <div>
        <p id="content">广州新华学院</p>

        <button id="removeBtn">解除</button>
    </div>

    <div>
        <p id="content1">信息科学学院</p>

        <button id="removeBtn1">解除</button>
    </div>
</body>
</html>