Javascript height statement
- by Sean
This is not working and I can't figure out where I went wrong:
<style>
* {
margin: 0px
}
div {
height: 250px;
width: 630px;
overflow: hidden;
vertical-align: top;
position: relative;
}
iframe {
position: absolute;
left: -50px;
top: -130px;
}
</style>
<script>
window.onload = function() {
document.getElementsByTagName('body')[0].onkeyup = function(e) {
var div = document.getElementById('capture');
if(e.keyCode == 70) {
if(div.style.height == 250){
alert("Yes");
}
else {alert("no");}
}
}
};
</script>