设置一个标签的不透明度
IE下
filter
obj.filter = "alpha(opacity=50)";
obj.filters("alpha").opacity =xx*100
Mozilla和Safari下
Opacity
obj.style.opacity = xx/100 透明度值
兼容性多种浏览器下
function SetOpacity(obj,opacity){
if(opacity >=1 ) opacity = opacity / 100;
try{
obj.style.opacity = opacity;
}
catch(e){}
try{
if(obj.filters)
{
obj.filters("alpha").opacity = opacity * 100;
}
}
catch(e){}
}