I need to disable submit button from 10.25 am to 11.25 am. This is the submit button below:
<input type="submit" id="submit" name="submit">
I am using this script. but it is not working.I am unable to find out where the problem is:
<script>
window.addEventListener("load", function(){
var currentTime = new Date();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();
var t =currentTime.getHours() + ":" + currentTime.getMinutes();
var newButton = document.getElementById("submit");
if(t >= 10:25 && t <= 11:25) {
newButton.style.display = "none";
}
else {
newButton.style.display = "block";
}
}, false);
</script>