而不是将# 放在 link 的 href 属性中,是否有另一种选择来获得相同的工作?

instead of puting # in href atribute of link,is there is another option to get the same working?

因为我们没有任何页面可以 link 它,我们把 # 作为我们示例中的 link。

它应该是一个真实的URL特定页面。

<a href="#"> Click Here </a>

I wanted to know, is there is another option to get the same working?

有时人们想在页面顶部显式 link。

更常见的是,他们将 JavaScript 绑定到元素上的点击事件,实际上根本不想 link 任何地方……在这种情况下,他们应该使用按钮而不是link.