Tag: IDT element Width HTML document BSP get text body
1 <Head>2 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />3 <title>Untitled Document</title>4 <styletype= "Text/css">5 *{margin:0px Auto;padding:0px;}6 #wai{width:500px;Height:200px;}7 </style>8 </Head>9 Ten <Body> One <DivID= "Wai"> A <imgsrc= "file:///D|/My Documents/Picture collection/6cd51674jw1e1q9gwhvwjj.jpg"class= "img"width= "$"Height= "$"/> - <imgsrc= "file:///D|/My Documents/Picture collection/6cd51674jw1e3cddnbahhj.jpg"class= "img"width= "$"Height= "$"style= "Display:none";/> - </Div> the </Body> - <Scripttype= "Text/javascript"> - varSuoyin=0; - varimg=Document.getelementsbyclassname ("img"); + Huan (); - functionHuan () { + Xianshi (); A if(Suoyin>=Img.length-1){ at Suoyin=0; - }Else{ - Suoyin++; - } - Window.settimeout ("Huan ()", -); - } in - functionXianshi () { to for(varI=0; I<Img.length;i++){ + Img[i].style.display="None"; - } the Img[suoyin].style.display="Block"; * } $ Panax Notoginseng </Script> - </HTML>
JS instance of the picture carousel, to achieve picture playback effect