Alert and setTimeout methods behaving differently in IE and Safari
posted 5 years ago
I am facing an issue with Safari when I execute the following code. Please help me to resolve the same.
The problem is that the below code is executing fine in IE. However, it is not executing in Safari.
In IE, when I enter the age value 62 and presses the button, I am getting an alert message. After 15 seconds, I am getting another alert message from timeout() method.
In Safari, When I enter the age value 62 and presses the button, I am getting an alert message. Immediately, I am getting another alert message from timeout() method.
The code is below:
Why the same code is behaving differently in Safari?