<script> | |
function test() { | |
if (window.testRunner) | |
testRunner.dumpAsText(); | |
var style = document.defaultView.getComputedStyle(document.getElementById("test"), ""); | |
var result = document.getElementById("result"); | |
if (style.display == "none") | |
result.appendChild(document.createTextNode("Test succeeded! The value of display is 'none'.")); | |
else | |
result.appendChild(document.createTextNode("Test failed. The value of display is '" + style.display + "'.")); | |
} | |
</script> | |
<body onload="test()"> | |
<div id="test" style="display: none"></div> | |
<div id="result"></div> | |
</body> |