• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 517
  • Last Modified:

simple refresh command via button on html page

I have a web page that opens at size 500, 500, so there are no buttons.

CTRL-R works for refresh, but I want a button to execute refresh, how do I do this ?
0
Alaska Cowboy
Asked:
Alaska Cowboy
  • 2
2 Solutions
 
Gurvinder Pal SinghCommented:
try any of these
<input type=button value="Refresh" onClick="history.go()">
<input type="button" value="Reload Page" onClick="window.location.reload()">
<input type="button" value="Reload Page" onClick="window.location.href=window.location.href">
0
 
infochandruCommented:
Hope this will helps you

<html>
<head>
<script type="text/javascript">
function reloadPage()
  {
  window.location.reload()
  }
</script>
</head>
<body>
<input type="text" >
<input type="button" value="Reload page"
onclick="reloadPage()" />

</body>
</html>
<html>
<head>
<script type="text/javascript">
function reloadPage()
  {
  window.location.reload()
  }
</script>
</head>
<body>
<input type="text" >
<input type="button" value="Reload page"
onclick="reloadPage()" />

</body>
</html>

Open in new window

0
 
Alaska CowboyAuthor Commented:
thank you both, will try it out now.
0
 
Alaska CowboyAuthor Commented:
worked ! thanks a lot.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now