+ 1
Is there a delay function for going from one line of code to another line of code? Web/HTML
Iām wondering if there is a delay function for one line of code to another on Web/HTML.
19 Answers
+ 4
Yes there is a function. š§Somyaš¹ mentioned it already.
The window object allows execution of code at specified time intervals... However, you must control it with JavaScript.
The two key methods to use with JavaScript are:
setTimeout()
setInterval()
You may learn more here.
https://www.w3schools.com/js/js_timing.asp
+ 2
Can you explain exactly what you're attempting to do so we can better help you with your situation?
When you say Web/HTML it is not clear. HTML is a markup language. WEB is an interconnected system of public webpages accessible through the Internet.
HTML is constructed with the DOM. With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
0
But what about HTML/Web thats what im looking at, I have a whole code already built out I just need delays in between lines.
0
Hold on
0
Nvm i figured it out.
0
Wait is it ok if i use one of your codes in my code?
0
???
0
What was the solution to your inquiry?
0
I thought i had it but i was wrong.
0
I still donāt know how to set a delay. Do you Chris Coder?
0
Ok iāll try it.
0
So can I not use Web/HTML then?
0
Web
0
If you want to execute code line by line. Then I recommend to download a IDE. Visual Studio Code is a good one. There you will be able to debug your code with a debugger. You can set breaks that will only run the code when you hit next.
https://docs.microsoft.com/en-us/visualstudio/debugger/debugger-feature-tour?view=vs-2022#set-a-breakpoint-and-start-the-debugger
0
Ok iāll try it.
0
You can use JS to setTimeout
0
How to add image in web/HTML