标签: html
in this demo https://css-tricks.com/examples/Target/ when I click on a "one" number the browser window relocate to div id="one", is there any way to stop this relocate effect?
答案 0 :(得分:0)
在div元素的click事件上使用event.preventDefault();,您可以停止重新定位窗口。
event.preventDefault();