0


歡迎光臨!! 救國團台中學苑 社會教育研習中心 電腦班隊研習營【網頁設計課程】


圖片/背景特效語法




圖片展示選單

 

 


圖案名稱:
圖案數量:/

在網頁要呈現的地方中加入


<center>
<img name="_Ath_Slide" onload="OnImgLoad()">
<br>
<input type="button" name="btnPrev" value="<< 上一張" onclick="Prev();">
<input type="button" name="bntPlay" value="展示 / 停止" onclick="Play()">
<input type="button" name="btnNext" value="下一張 >>" onclick="Next();">
<br>
<b>圖案名稱:<SPAN id="_Ath_FileName"></SPAN></b>
<br>
<b>圖案數量:<SPAN id="_Ath_Img_X"></SPAN><strong>/</strong><SPAN id="_Ath_Img_N"></SPAN></b>
<script language="JavaScript1.2" event="onload" for="window">
<!--
main();
-->
</script>
<script language="JavaScript1.2">
<!--
g_fPlayMode = 0;
g_iimg = 0;
g_imax = 0;
g_ImageTable = new Array();
function ChangeImage(fFwd)
{
if (fFwd)
{
if (++g_iimg==g_imax)
g_iimg=0;
}
else
{
if (g_iimg==0)
g_iimg=g_imax;
g_iimg--;
}
Update();
}
function Update(){
document.all._Ath_Slide.src = g_ImageTable[g_iimg][0];
document.all._Ath_FileName.innerHTML = g_ImageTable[g_iimg][1];
document.all._Ath_Img_X.innerHTML = g_iimg + 1;
document.all._Ath_Img_N.innerHTML = g_imax;
}
function Play()
{
g_fPlayMode = !g_fPlayMode;
if (g_fPlayMode)
{
btnPrev.disabled = btnNext.disabled = true;
Next();
}
else
{
btnPrev.disabled = btnNext.disabled = false;
}
}
function OnImgLoad()
{
if (g_fPlayMode)
window.setTimeout("Tick()", g_dwTimeOutSec*1000);
}
function Tick()
{
if (g_fPlayMode)
Next();
}
function Prev()
{
ChangeImage(false);
}
function Next()
{
ChangeImage(true);
}
function main()
{
Update();
}
g_ImageTable[g_imax++] = new Array ("http://wssh0812.myweb.hinet.net/05/gif/dis/disney178.gif","小熊維尼(一)");
g_ImageTable[g_imax++] = new Array ("http://wssh0812.myweb.hinet.net/05/gif/dis/disney167.gif","小熊維尼(二)");
g_ImageTable[g_imax++] = new Array ("http://wssh0812.myweb.hinet.net/05/gif/dis/disney113.gif","小熊維尼(三)");
g_ImageTable[g_imax++] = new Array ("http://wssh0812.myweb.hinet.net/05/gif/dis/disney105.gif","米老鼠(一)");
g_ImageTable[g_imax++] = new Array ("http://wssh0812.myweb.hinet.net/05/gif/dis/disney096.gif","米老鼠(二)")
;g_ImageTable[g_imax++] = new Array ("http://wssh0812.myweb.hinet.net/05/gif/dis/disney042.gif","米老鼠(三)");
g_dwTimeOutSec=2
window.onload=Play
-->
</script>
</center>


上一頁下一頁 │                                      │ 回首頁 回特效語法  │