Mirá la diferencia:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<style>
#pp{visibility:hidden}
</style>
<script type="text/javascript">
function cascadedstyle(el, cssproperty, csspropertyNS){
if (el.currentStyle) //if IE5+
return el.currentStyle[cssproperty]
else if (window.getComputedStyle){ //if NS6+
var elstyle=window.getComputedStyle(el, "")
return elstyle.getPropertyValue(csspropertyNS)
}
}
onload=function(){
alert(cascadedstyle(document.getElementById('pp'),'visibility','visibility'));
alert(document.getElementById('pp').style.visibility)
}
</script>
</head>
<body>
<div id="pp"></div>
</body>
</html>