标签: reactjs typescript next.js
我尝试在点击按钮中获取事件
const selectHandler = (e: React.MouseEvent) => { console.log(e.target?.name); }; <button name="active" onClick={selectHandler}> Active </button>
但是我就这样衰弱了,
谁能给我解释一下?