次の画像に移動する

書式

<a href="javascript:void(0)" onclick="hs.next(this)">〜</a>

説明

次の画像に移動するにはhs.next()を使います。パラメータには閉じる画像オブジェクトを指定します。パラメータにthisを指定すると、それ自身の画像が閉じられます。

サンプルコード [実行]

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="main.css" type="text/css" media="all">
<script type="text/javascript" src="highslide.js"></script>
<script type="text/javascript"><!--
hs.graphicsDir = "./graphics/";
hs.outlineType = "rounded-white";
window.onload = hs.preloadImages;
// --></script>
</head>
<body>
<h1>Highslideサンプル</h1>
<div id="highslide-container"></div>
<a href="photo/1.jpg" id="thumb1" class="highslide" onClick="return hs.expand(this)">
<img src="thumbnail/1.jpg" width="64" height="48"></a>
<div class="highslide-caption" id="caption-for-thumb1">
<a href="javascript:void(0)" onclick="hs.previous(this)">前へ</a>
<a href="javascript:void(0)" onclick="hs.next(this)">次へ</a>
</div>
<a href="photo/2.jpg" id="thumb2" class="highslide" onClick="return hs.expand(this)">
<img src="thumbnail/2.jpg" width="64" height="48"></a>
<div class="highslide-caption" id="caption-for-thumb2">
<a href="javascript:void(0)" onclick="hs.previous(this)">前へ</a>
<a href="javascript:void(0)" onclick="hs.next(this)">次へ</a>
</div>
<a href="photo/3.jpg" id="thumb3" class="highslide" onClick="return hs.expand(this)">
<img src="thumbnail/3.jpg" width="64" height="48"></a>
<div class="highslide-caption" id="caption-for-thumb3">
<a href="javascript:void(0)" onclick="hs.previous(this)">前へ</a>
<a href="javascript:void(0)" onclick="hs.next(this)">次へ</a>
</div>
</body>
</html>