經安全檢測,此網站為安全網站,請放心前往原始網址!

html - Href attribute for JavaScript links: "#" or "javascript:void(0)"? - Stack Overflow

I find this answer to be overly dogmatic. There are times when you just want to apply the JS behavior to 1 or 2 a href's. In that case it's overkill to define extra CSS and inject a whole JS function. In some cases (e.g. adding content via a CMS) you are

stackoverflow.com

網址安全性掃描由 google 提供