document.getElementById('yesBtn').onclick = function () { alert('忠诚度++!你真是王亚洲的好狗狗!'); };
<h1>你是否是王亚洲的狗?</h1> <button id="yesBtn">YES!</button>