游E资源网—网络资源专家,汇集网络资源
最新文章
推荐文章
相关内容
游E资源网 >> 代码收集 >> 若隐若现的按钮

若隐若现的按钮

游E资源网 互联网 游E资源 2007-3-28 15:25:27

第一步:将下面的代码加入<head>和</head>之间: 

<script language="JavaScript1.2">

/*
modified by mars ,www.joysoft.net
*/

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>

第二步:将下列代码放置到希望产生变化的图片标记中(<img>) 

style="filter:alpha(opacity=40)" onMouseover="high(this)" onMouseout="low(this)"

Google

责任编辑: 参与评论
Copyright 2004-2007 游E资源网 All Rights Reserved - 豫ICP备05004860号