Hacker News new | ask | show | jobs
by twobyfour 3272 days ago
Neither, put a real URL in there so people can a) use your site without JS and b) open links in new tabs. Use e.preventDefault().

If you can't put a URL in it, use a different element. Why can't you use <button>? It's definitely the correct element for something that takes an action. In a pinch, fall back on <span>?

1 comments

Thank you for your help, Sir.