a href=#

Instead of using href="#", it is better to use href="javascript:void(0);" to make page not go up when we click on link
Also, prefer using type="button" to prevent a button from submitting a form

CodeFunctionName
What is this?

Public

Tested

Original Work

<a href="#" onclick="func()" >Testing1 </a >

<a href="javascript:void(0);" onclick="func()" >Testing1 </a >

button inside <form > to prevent submitting the form
<button type="button" >Not a submit </button >

Views 3,595

Downloads 1,330

CodeID
DB ID