<button type="button" id="btn">送出</button>
var btnID = document.getElementById('btn'); btnID.addEventListener('click', function() { console.log(this); })
This Pen is owned by Ray on CodePen.
See more by @hsiangfeng on CodePen
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.