网页设计图片向上浮动_网页浮动图片代码

  • Post author:
  • Post category:其他


var widths = 865;

/*显示高度,自行调整*/

var heights = 255;

/*显示宽度,自行调整*/

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=”; //图片点击的网页链接

//url2=new Image ();url2.src=”;

//url3=new Image ();url3.src=”;

//url4=new Image ();url4.src=”;

//url5=new Image ();url5.src=”;

/* 建议将这块放置于JS中 下面的部分几乎是不需要任何改动*/

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(‘

‘);

//for(var i=1;i’+i+”);}

change_img();



版权声明:本文为weixin_31919471原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。