Try the below approach.
<html>
<head>
<title> Reload the Page</title>
<script type="text/javascript">
function ref2()
{
var UserTime = document.getElementById("txttime").value;
window.name = UserTime;
ref1();
}
function ref1()
{
var time=window.name;
if(time!="" && time!=0)
{
time=time*1000*60;
setTimeout("location.reload();",time);
alert("page reload after the " + window.name + " mins");
}
else if(time=="")
{
time=5*1000*60;
setTimeout("location.reload();",time);
alert("Default Reload 5 mins");
}
document.getElementById("txttime").value = window.name;
}
</script>
</head>
<body onload="return ref1()">
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>Enter the time:</td><td><input type="text" id="txttime" /></td></tr>
<tr><td align="center"><input type="button" value="enter" id="bttme" onclick="return ref2()"; /></td></tr></table>
</div>
</form>
</body>
</html>