Contoh dalam artikel ini menerangkan kaedah menggunakan js untuk mencapai kesan kecerunan lut sinar imej grid sembilan segi empat sama. Kongsikan dengan semua orang untuk rujukan anda. Kaedah pelaksanaan khusus adalah seperti berikut: Salin kod Kod adalah seperti berikut: Kesan kecerunan lut sinar gambar grid segi empat sama .invisible {<br> PENAPIS: alpha(opacity=0)<br> }<br> </GAYA><p><SCRIPT language=JavaScript1.2><br> <!--<br /> fungsi tinggi(yang2){<br /> theobject=which2<br /> highlighting=setInterval("highlightit(theobject)",50)<br /> }<br /> fungsi rendah(yang2){<br /> clearInterval(highlighting)<br /> which2.filters.alpha.opacity=0<br /> }<br /> fungsi highlightit(cur2){<br /> jika (cur2.filters.alpha.opacity<100)<br /> cur2.filters.alpha.opacity =10<br /> else if (window.highlighting)<br /> clearInterval(highlighting)<br /> }<br /> //--><br> </SCRIPT><br> <TABLE borderColor=#999999 cellSpacing=8 cellPadding=0 width=302 <br /> sempadan=0><TBODY><br> <TR><br> <TD width=90 background=text1.gif bgColor=#db4d0e <br /> ketinggian=90><A href=""><IMG <br /> class=invisible onmouseover=high(this) onmouseout=rendah(ini) <br /> src="/images/m01.jpg" border=0 width=180px height=135px></A></TD><br> <TD width=90 background=text2.gif bgColor=#ff9f07><A <br /> href="/"><IMG <br /> class=invisible onmouseover=high(this) onmouseout=rendah(ini) <br /> src="/images/m02.jpg" border=0 width=180px height=135px></A></TD><br> <TD width=90 background=text3.gif bgColor=#ff9f07><A <br /> href=""><IMG class=invisible <br /> onmouseover=high(this) onmouseout=low(this) src="/images/m03.jpg" <br /> sempadan=0 lebar=180px tinggi=135px></A></TD></TR><br> <TR><br> <TD background=text4.gif bgColor=#ff9f07><A <br /> href="/"><IMG <br /> class=invisible onmouseover=high(this) onmouseout=rendah(ini) <br /> src="/images/m04.jpg" sempadan=0 lebar=180px tinggi=135px></A></TD><br> <Latar belakang TD=text5.gif bgColor=#a5d523><A <br /> href="/"><IMG <br /> class=invisible onmouseover=high(this) onmouseout=rendah(ini) <br /> src="/images/m05.jpg" sempadan=0 lebar=180px tinggi=135px></A></TD><br> <TD background=text6.gif bgColor=#c56e19><A <br /> href="/"><IMG <br /> class=invisible onmouseover=high(this) onmouseout=rendah(ini) <br /> src="/images/m06.jpg" border=0 width=180px height=135px></A></TD></TR><br> <TR><br> <TD background=text12.gif bgColor=#ff9f07><A <br /> href="/"><IMG <br /> class=invisible onmouseover=high(this) onmouseout=rendah(ini) <br /> src="/images/m07.jpg" sempadan=0 lebar=180px tinggi=135px></A></TD><br> <Latar belakang TD=text8.gif bgColor=#c56e19><A <br /> href="/"><IMG <br /> class=invisible onmouseover=high(this) onmouseout=low(this) src="/images/m08.jpg" <br /> border=0 width=180px height=135px></A></TD><br> <TD background=text7.gif bgColor=#c56e19><A <br /> href="/"><IMG <br /> class=invisible onmouseover=high(this) onmouseout=low(this) <br /> src="/images/m09.jpg" border=0 width=180px height=135px></A></TD></TR></TBODY></TABLE><br> </body><br> </html></p> </div> <p>希望本文所述对大家的javascript程序设计有所帮助.</p>