In the example code below I have a button that when clicked reloads the page, but hitting enter does not do so, how would one amend it so that hitting enter would also refresh the page?
<h3>click to refresh page</h3>
<input type="button" value="Refresh" onClick="history.go(0)">
You could set a key handler on the page itself if you want to catch any ENTER keypress anywhere: