Skip to content Skip to sidebar Skip to footer

Reload Other Page When Click Button "refresh"

In current page, add button 'Refresh' Process: when user click this button 'Refresh', then this page link 'https://abc.io/123' refreshed and do not open this link (not new page), s

Solution 1:

First of all onClick should be onclick. This will reload the page, except if the DOMException gets thrown, which blocks the reload. You can read more about it here. By default, the page gets reloaded from the browser cache. To force reload it from the server, pass true to window.location.reload().

<ahref="https://abc.io/123"onclick="window.location.reload(); return false;"><iclass="fas fa-sync-alt fa-1.5x"aria-hidden="true"style="color:#0000FF;"></i><spanstyle="color:blue;"> Refresh</span></a>

If you intend to open the link as well, return true from the onclick function.

Post a Comment for "Reload Other Page When Click Button "refresh""