Source code (wrong):
The console reports an error when executing:
Source code (after modification):
The above is the detailed content of How to solve the problem that setInterval() timer only executes once. For more information, please follow other related articles on the PHP Chinese website!