藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

菜鳥求助:當鼠標移到A圖像而使B圖像變化

我超這勒代碼實現:當鼠標移到圖像時,圖像由透明變成不透明。,但我想實現當鼠標移到A圖像而使B圖像變化,請教該如何做是不是把底下那個this改了,應該怎麼改呢
onMouseover="high(this)" onMouseout="low(this)
。。。謝謝

[html]
<img name=ye src=http://www.blueidea.com/gg/idc2008/208X33.gif alt="別停在這裡,把鼠標放在下面的圖片上"><p>
<img src= onmouseover="ye.src='http://www.blueidea.com/gg/kdt/206.gif'" onmouseout="ye.src='http://www.blueidea.com/gg/idc2008/208X33.gif'">
[/html]

不是這樣子勒。。,我想實現當鼠標移到A,而使B又透明變成不透明。。,不是換一副圖。。,謝謝

[html]
<img name=ye src=http://www.blueidea.com/gg/idc2008/208X33.gif alt="別停在這裡,把鼠標放在下面的圖片上" style="filter:alpha(Opacity=50)"><p>
<img src= onmouseover="ye.filters.alpha.Opacity=100" onmouseout="ye.filters.alpha.Opacity=50">
[/html]

是那種漸漸變化勒,抄勒代碼在這。。
<script language="JavaScript1.2">
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=20
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}
</script>

[html]
<img name=ye src=http://www.blueidea.com/gg/idc2008/208X33.gif alt="別停在這裡,把鼠標放在下面的圖片上" style="filter:alpha(Opacity=50)"><p>
<img src= onmouseover="high(ye)" onmouseout="low(ye)">
<script language="JavaScript1.2">
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=50
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}
</script>
[/html]

哇,得行了,厲害。
感謝高手指點。。,太感謝了




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com