Code for switching JavaScript images with thumbnails

Source: Internet
Author: User
Tip: you can modify some code before running

<style>BODY {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; BACKGROUND: #000; PADDING-BOTTOM: 0px; MARGIN-LEFT: auto; COLOR: #f6f6ee; MARGIN-RIGHT: auto; PADDING-TOP: 0px; FONT-FAMILY: 宋体; HEIGHT: 490px; TEXT-ALIGN: center}A {COLOR: #fff; TEXT-DECORATION: none}A:hover {COLOR: #fff; TEXT-DECORATION: underline}.fpic {BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; Z-INDEX: 3; BACKGROUND: #000; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 476px; POSITION: relative; HEIGHT: 330px; BORDER-RIGHT-WIDTH: 0px;BORDER: #dddddd 1px solid;text-align:center}.bpic {FLOAT: left; MARGIN: 0px; WIDTH: 244px; POSITION: relative; HEIGHT: 243px}#focpic {BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; LEFT: 1px; BORDER-BOTTOM-WIDTH: 0px; POSITION: absolute; TOP: 1px; BORDER-RIGHT-WIDTH: 0px}.thubpic {PADDING-RIGHT: 0px; PADDING-LEFT: 4px; Z-INDEX: 20; PADDING-BOTTOM: 0px; WIDTH: 63px; CURSOR: pointer; PADDING-TOP: 4px; TOP: 10px; HEIGHT: 49px}.thubpiccur {PADDING-RIGHT: 0px; PADDING-LEFT: 4px; Z-INDEX: 20; PADDING-BOTTOM: 0px; WIDTH: 63px; CURSOR: pointer; PADDING-TOP: 4px; TOP: 10px; HEIGHT: 49px}.thubpiccur {Z-INDEX: 30; BACKGROUND: url(icon/images20071220/arrow3.gif) no-repeat left 50%}.thubpic IMG {BORDER-RIGHT: #666 3px solid; BORDER-TOP: #666 2px solid; BORDER-LEFT: #666 3px solid; WIDTH: 56px; BORDER-BOTTOM: #666 2px solid; HEIGHT: 42px}.thubpiccur IMG {BORDER-RIGHT: #666 3px solid; BORDER-TOP: #666 2px solid; BORDER-LEFT: #666 3px solid; WIDTH: 56px; BORDER-BOTTOM: #666 2px solid; HEIGHT: 42px}.thubpiccur IMG {BORDER-LEFT-COLOR: #fff; BORDER-BOTTOM-COLOR: #fff; BORDER-TOP-COLOR: #fff; BORDER-RIGHT-COLOR: #fff}--></style><SCRIPT language=javascript>// All by 111cn. netvar currslid = 0; var s0000int; function setfoc (id) {document. getElementById ("focpic "). src = picarry [id]; document. getElementById ("foclnk "). href = lnkarry [id]; document. getElementById ("fttltxt "). innerHTML = ''+ ttlarry [id] +''; currslid = id; for (I = 0; I <6; I ++) {document. getElementById ("tmb" + I ). className = "thubpic";}; document. getElementById ("tmb" + id ). className = "thubpiccur"; focpic. style. visibility = "hidden"; focpic. filters [0]. apply (); if (focpic. style. visibility = "visible") {focpic. style. visibility = "hidden"; focpic. filters. revealTrans. transition = 23;} else {focpic. style. visibility = "visible"; focpic. filters [0]. transition = 23;} focpic. filters [0]. play (); stopit () ;}function playnext () {if (currslid = 5) {currslid = 0 ;}else {currslid ++ ;}; setfoc (currslid ); playit ();} function playit () {slidint = setTimeout (playnext, 4500);} function stopit () {clearTimeout (slidint);} window. onload = function () {playit ();}</sCRIPT></head><body><DIV class=fpic> <DIV id=fttltxt >Dream: pastures</dIV><DIV ><DIV class=thubpiccur id=tmb0 onmouseover=setfoc(0); onmouseout=playit();></dIV><DIV class=thubpic id=tmb1 onmouseover=setfoc(1); onmouseout=playit();></dIV><DIV class=thubpic id=tmb2 onmouseover=setfoc(2); onmouseout=playit();></dIV><DIV class=thubpic id=tmb3 onmouseover=setfoc(3); onmouseout=playit();></dIV><DIV class=thubpic id=tmb4 onmouseover=setfoc(4); onmouseout=playit();></dIV><DIV class=thubpic id=tmb5 onmouseover=setfoc(5); onmouseout=playit();></dIV><SCRIPT language=javascript type=text/javascript>Var picarry ={}; var lnkarry ={}; var ttlarry ={}; picarry [0] = "yun_qi_img/01.jpg"; lnkarry [0] =" http://111cn.net /"; ttlarry [0] = "dream: Ranch Hut"; picarry [1] = "yun_qi_img/02.jpg"; lnkarry [1] =" http://111cn.net/"; ttlarry [1] =" broken jade: reviewed "; picarry [2] =" yun_qi_img/03.jpg"; lnkarry [2] = "http://111cn.net/"; ttlarry [2] = "flying fox: bean flower "; picarry [3] = "yun_qi_img/04.jpg"; lnkarry [3] =" http://111cn.net/"; ttlarry [3] =" Ox says no cry: construction workers under the scorching sun "; picarry [4] = "yun_qi_img/05.jpg"; lnkarry [4] =" http://111cn.net/"; ttlarry [4] =" Xinjiang WAG: Kazakh build felt Room "; picarry [5] = "yun_qi_img/06.jpg"; lnkarry [5] =" http://111cn.net/"; ttlarry [5] =" Bright Moon: automobile culture ";</sCRIPT></dIV></dIV>This code is provided by 111cn
Tip: you can modify some code before running

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.