javascript prevent page refresh on click event code example Example: page reloads after onclick <button onClick="history.go(0);">Refresh Page</button>