html - href must not reload -
i testing following link:
<a href="#">link</a>
but, expected, reloads current page. how can prevent reloading page, maintaining -a- tag assigned it?
thanks ;)
if don't want behave link, don't use link tag. doing hurt accessibility of page, , don't want that. there other ways of browsing website browser (think screen readers), relies on semantics of page elements. use span
if want apply style.
if still want use anchor, can use -
<a href="#" onclick="return false;">link</a>
this prevent page reloading.
Comments
Post a Comment