JavaScript External File
JavaScript 外部ファイルについて    


複数の画像を順番に表示


Pictures




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja-JP">
<head>
<meta http-equiv="content-type" content="text/html; charset=shift_jis">
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">
<title>複数の画像を順番に表示</title>

<script type="text/javascript">
<!--
Pic = new Array("001.jpg","002.jpg","003.jpg"); //表示したい画像のURL
image = 0;

function palit(){
	document.mypictures.src = Pic[image];
	image++;
	if( image==3 ){//使用する画像の枚数
		image = 0; //表示する回数 0で無限
	}
	setTimeout("palit()",4000); //表示される時間の間隔(秒数)
}
window.onload = palit;
// -->
</script>

</head>
<body>

<h1>複数の画像を順番に表示</h1>

<!-- 最初に表示したい画像のファイル名を記入 -->
<img name="mypictures" src="001.jpg" alt="Pictures">

</body>
</html>

 | HOME  | 相互リンク集  | 初心者に分かりやすい JavaScript サンプル | 

 | Contact us at Feedback  | SitePolicy | 

Last Update: 6 / 25 / 2008 17:23:23 JST

 | 子連れ ヘラブナ釣り  | ひかる君の写真集  | Bayani  | Balita  | Bagong Bayani  | Directory  | Yahoo! 360°  | Web BBS  | JS File |