Is there a delay function for going from one line of code to another line of code? Web/HTML | Sololearn: Learn to code for FREE!

+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.

7/4/2022 12:25:39 AM

RJbologna

19 Answers

New Answer

+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

You can use setTimeout in built function in javascript

+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

RJbologna Show your code

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

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