Web page floating Picture code

Source: Internet
Author: User
Tags eval
<div id= "Flash" >
<script type= "Text/javascript" >
var widths = 865;
/* Display height, self adjustment * *
var heights = 255;
/* display width, self adjustment * *
var counts = 5;
IMG1 = new Image ();
IMG1.SRC = ' images/flash_07.jpg ';
Img2 = new Image ();
IMG2.SRC = ' images/flash_071.jpg ';
IMG3 = new Image ();
IMG3.SRC = ' images/flash_072.jpg ';
IMG4 = new Image ();
IMG4.SRC = ' images/flash_073.jpg ';
IMG5 = new Image ();
IMG5.SRC = ' images/flash_074.jpg ';
Url1=new Image (); url1.src= '; Pictures click on the page link
Url2=new Image (); url2.src= ';
Url3=new Image (); url3.src= ';
Url4=new Image (); url4.src= ';
Url5=new Image (); url5.src= ';
/* Recommend that this block be placed in the lower part of JS is almost no need for any changes * *
var nn = 1;
var key = 0;
function change_img () {
if (sys.ie) {
document.getElementById ("Pic"). Filters[0]. Apply ();
document.getElementById ("Pic"). Filters[0]. Play (Duration = 2);
//}
Eval (' document.getElementById ("Pic '). Src=img ' + nn + '. src ');
Eval (' document.getElementById (' url '). Href=url ' +nn+ '. src ');
nn++;
if (nn > counts) {
nn = 1;
}
tt = settimeout (' change_img () ', 7000);
} else {
if (key = = 0) {
key = 1;
else if (document.all) {
document.getElementById ("Pic"). Filters[0]. Apply ();
document.getElementById ("Pic"). Filters[0]. Play (Duration = 2);
}
Eval (' document.getElementById ("Pic '). Src=img ' + nn + '. src ');
Eval (' document.getElementById (' url '). Href=url ' +nn+ '. src ');
nn++;
if (nn > counts) {
nn = 1;
}
tt = settimeout (' change_img () ', 7000);
}
}
function changeimg (n) {nn=n;window.clearinterval (TT); change_img ();}
document.write (' <div><a id= "url" ></a></div> ');
for (Var i=1;i<counts+1;i++) {document.write (' <a href= ' javascript:changeimg (' +i+ '); "id=" Xxjdjj ' +i+ ' "class=" "Axx" target= "_self" > ' +i+ ' </a> ');
Change_img ();
</script>
</div>

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.