
i want to know calculate the time for 2 minutes(from current time started),after that the button in the page will be disable

Hi,
Here is the complete code example. Button will be disabled after 1 minute. You can increase time interval as per your requirement.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>JavaScript Timer One minutes</TITLE>
<Script language="JavaScript">
setTimeout("hideButton()",60000);//one minute
function hideButton(){
window.document.myform.mybutton.disabled=true;
alert("Button disabled");
}
</Script>
</HEAD>
<BODY>
<form name="myform" id="myform">
<input type="button" name="mybutton" id="mybutton"
value="Button will disable after 1 minutes">
</form>
</BODY>
</HTML>
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.