快捷搜索:  as  2018  FtCWSyGV  С˵  test  xxx  Ψһ  w3viyKQx

永乐国际APP_利用JAVASCRIPT制作简单动画



假如你必要改更改画播放速率,

比如每5秒换一张图片

改变setTimeout("imgturn('" +numb+ "')", 1000)中的永乐国际APP1000为5000

<html>

<head>

<title></title>

<script language="JavaScript">

<!--

//请先筹备几张JPG图片款式的,名字是demo1.jpg,demo2.jpg,demo3.jpg

if (document.images) {

demo1 = new Image();

demo1.src = "../..永乐国际APP/images/demo1.jpg";

demo2 = new Image();

demo2.src = "../../images/demo2.jpg";

demo3 = ne永乐国际APPw Image();

demo3.src = "../../images/demo3.jpg";

}

function timeimgs(numb) {

thetimer = setTimeout("imgturn('" +numb+ "')", 1000);

}

function imgturn(numb) {

if (document.images) {

if (numb == "3") {

document["demo"].src 永乐国际APP= eval("demo3.src");

timeimgs('1');

}

else { document["demo"].src = eval("demo" + numb + ".src");

timeimgs(numb = ++numb);

}

}

}

// -->

</script>

</head>

<body onload="timeimgs('2');">

<img src="../../images/demo1.永乐国际APPjpg" name="demo" width="100" height="100" alt="demo">

您可能还会对下面的文章感兴趣: