how to call function for onclick attribute without page reloading code example Example: page reloads after onclick Refresh Page