Joseph Michael Pesch
VP Programming

HTML Opacity

by 16. February 2009 18:21

<scriptid="SetOpacity"type="text/javascript"language="Javascript">
function SetOpacity(obj, val) { val = (val > 100) ? 100 : val;
val = (val < 0) ? 0 : val;
obj.setAttribute('SetOpacity', val); alert(obj.id);
if (navigator.appName.indexOf("Netscape") != -1 && parseInt(navigator.appVersion) >= 5) { obj.style.MozOpacity = val / 100;
obj.style.opacity = val / 100;
}
elseif (navigator.appName.indexOf("Microsoft") != -1 && parseInt(navigator.appVersion) >= 4) { obj.style.filter = 'alpha(opacity=' + val + ')'; //obj.filters.alpha.opacity = val





}
}
</script>

Tags: ,

HTML

Comments are closed