if(getZhufu()){ alert('Happy birthday!!!') }else{ confirm('不可以不接受我的祝福哟,请确认并查收') || getZhufu() } function getZhufu(){ return confirm('今天是你的生日!') }
<div> 生日快乐! </div>
div{ background: gold }