<div class="codetitle"><span><a style="CURSOR: pointer" data="70737" class="copybut" id="copybut70737" onclick="doCopy('code70737')"><u>複製程式碼</u></a></span></div>複製程式碼<div class="codebody" id="code70737"> <br><br> 程式碼如下:<br><br> <br>//IdFF 瀏覽器</div>document.getElementBy."IMG1" ).style.opacity = "0.5"; <br>// IE 瀏覽器document.getElementById("IMG1").style.filter = 'alpha(opacity=50)'; W3C標準的寫法跟FF瀏覽器一樣.