<script language="JavaScript" type="text/JavaScript">
<!--
function trains(id,text){document.all[id].innerHTML=' '+text}
function trainpic(id,text){document.all[id].innerHTML='<img src="'+text+'.gif">'}
function high(which2){
theobject=which2;theobject.filters.alpha.opacity=0
highlighting=setInterval("highlightit(theobject)",50)}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=100}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=15
else if(window.highting)
clearInterval(highlighting)}
//-->
</script>
写好以上的Script后,在图片里加入onmouseover="this.style.filter='alpha(opacity=100)';high(this)" onmouseout="low(this)",在鼠标经过时,就开始执行以上程序。
如以下例子:
<img src="images/zhaoshan01.gif" onmouseover="this.style.filter='alpha(opacity=100)';high(this)" onmouseout="low(this)">