JAVASCRIPT代码如何在网页中呈现动态效果
发布网友
发布时间:2022-04-28 16:34
我来回答
共1个回答
热心网友
时间:2022-04-07 10:58
<script language="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>
<img src="要显示的图片" onmouseover="this.style.filter='alpha(opacity=100)';high(this)" onmouseout="low(this)">