Reload Web Page

1

I intend to click on a button to reload the page.

Warning that <a> is in a navbar file is external to the original file. I call navbar through php and this button is in navbar .

Below is the code that I tried to implement this:

function Refresh(){
  window.location.reload();
}
<html>
<body>
  <a onclick="Refresh"><i class="fa fa-fw fa-refresh"></i> <p>refresh</p></a>
</body>
</html>
    
asked by anonymous 01.11.2017 / 23:55

1 answer

3

You forgot to call the function Refresh() :

<a onclick="Refresh()"><i class="fa fa-fw fa-refresh"></i> <p>refresh</p></a>
    
01.11.2017 / 23:58