※ 變化按鈕 ※
|
原本的圖檔 | ||
p1off.gif | p2off.gif | |
按下後的圖檔 | ||
p1on.gif | p2on.gif |
<script> function pItem (name, width, height) { this.on = new Image(); this.on.src = name + "on.gif" this.off = new Image(); this.off.src = name + "off.gif" } function p_new (name) { pItem[name] = new pItem(name); } function img_act (imgName) { if (document.images) document[imgName].src = pItem[imgName].on.src; } function img_inact (imgName) { if (document.images) document [imgName].src = pItem[imgName].off.src; } function load_p (name, num) { for (i = 1; i <= num; i++) p_new(name + i); } if (document.images != null) load_p ('p', 18); // --> </script> <BODY>
<table width="100%"
border="0" cellspacing="0" cellpadding="4"> <tr><td align=center> </TABLE> |