然而,在反应中,它如下骆驼壳公约:
而在React中,必须显式调用preventDefault():
函数handleClick(事件){
event.preventDefault()
console.log('已单击链接')
}