Timing of JavaScript advanced tutorial (lesson 3) events and browser recognition
With the increasingly rich JavaScript, we can develop more and more complex applications. In the last course, we learned how to use JavaScripts to write Cookies. Today we will learn how to add the timing function. The time-based timing function is very useful in browsers, and can play a greater role in Dynamic HTML applications.
You may notice that dynamic HTML can move different content on the page. In JavaScript, a loop is used to move an object on the screen. The loop function is used to move the object over time. But how do you tell JavaScript to move an object a little bit every second or every 10 minutes?
However, the ability to move an object varies greatly in different browsers. To apply Dynamic HTML in different browsers, you need to do some special work. After explaining the event timing, I will explain how to identify the browser that the user is using (you can use different program code for different browsers ).
First, learn the timing of events. Click the button below. a prompt box will pop up three seconds later.