How can we set in javascript or jquery for example:
time = 0; //0 second
// and time will start by 1 second to infinite second
if(time <= 10) { // 10 is 10 second here
alert("abc");
} else {
alert("xyz");
}
Suppose web page is loaded and time should increment by 1 second and when it has been 10 second it should alert abc and when more than 10 second it should alert xyz
The whole process should run automatically when page is loaded not by clicking on start and end button
Please help me to find it? Thanks in advance.