@linnea Установить задержку в Javascript можно с помощью setTimeout() :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> </head> <body> <script> setTimeout(test, 2000); function test() { console.log("test"); } </script> </body> </html> |