Web front end of the day to learn a little JS knowledge of the fourth issue

Source: Internet
Author: User

<! DOCTYPE html><Html><Head><Metahttp-equiv= "Content-type"Content= "text/html; Charset=utf-8 "><Title> Untitled Document </Title></Head><Body><Imgsrc= "Img/0.jpg"/><Imgsrc= "Img/0.jpg"/><Imgsrc= "Img/0.jpg"/><Imgsrc= "Img/0.jpg"/><Imgsrc= "Img/0.jpg"/><Imgsrc= "Img/0.jpg"/><ScriptSrc= "Js/myjs_file.js" ></Script><Script>var aimg = document.getelementsbytagname ("img");function showTime () {var myTime = new Date (); var iminutes = Mytime.getminutes (); var iseconds = Mytime.getseconds (); var str = Addzero (ihours) +addzero (iminutes) +addzero (iseconds); for (var i=0;i<str.length;i++) {aimg[i].src = "img/" + str.charat (i) + ". JPG "; }}setinterval (showTime, +); </script></body>< Span id= "Line34" ></HTML> 


Ps:myjs_ File.js inside is actually a. Using the Trinocular operator to determine whether the number is greater than 10, when it is greater than 10 o'clock, the output is less than 10, and the number is preceded by 0;

Web front end of the day to learn a little JS knowledge of the fourth period

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.