I have the following code:<a href="#">
<p>
<a href="#" id="sobo-einblenden">einblenden</a>
<a href="#" id="sobo-ausblenden">ausblenden</a>
</p>
<div id="sozialbookmarks">
<p>
<b>Bereich für social bookmarks</b><br>
Hier kommen nun die üblichen Verdächtigen und Logos dazu.<br>
Nicht vergessen, meine Seite zu bookmarken!
</p>
</div>
<div id="sozialbookmarks2">
<p>
<b>Bereich für social bookmarks</b><br>
Hier kommen nun die üblichen Verdächtigen und Logos dazu.<br>
Nicht vergessen, meine Seite zu bookmarken!
</p>
</div>
When I click on <a href="#" id="sobo-einblenden">einblenden</a>
in the browser I will see: site.php#
. How can I make it so that the #
is not added to the URL?
는 'FALSE'돌아가거나 ('로 preventDefault를 호출 할 수있는 방법
바닐라 자바 스크립트와 같은 일을 수행하는 방법)'를 클릭하면됩니다. –preventDefault()
바닐라 자바 스크립트에 대한 비슷한 질문이있다 : 여기이런 종류의 링크를 찾는 것이 일반적입니까? 앵커가 필요 없다면 왜'href = "#"'를 써야할까요? '' it's better and you don't need extra functionality. It's valid also ''. Don't need an ficticional anchor that you need to avoid with extra javascript. Be serious. –