SOURCE

console 命令行工具 X clear

                    
>
console
const btn = document.getElementById('btn')

btn.addEventListener('click', function(event) {
    event.preventDefault(); // 阻止默认行为
    // 其他自定义逻辑
});
btn.onclick = (event) => {
    console.log(11212)
}
<div class="wrapper">
    <div class="watermark"></div>
	<div class="content">
		<div>text</div>
		<button id='btn'>click</button>
        <div style="color:red">hahaha...</div>
    </div>
</div>
#btn {
    /* pointer-events: none   */
}

.wrapper {
    position: relative;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.watermark {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    pointer-events: none;
    background-image: url(https://cdns.jsrun.net/css/img/logo.png);
    background-repeat: space;
}