Javascript height statement
Posted
by
Sean
on Stack Overflow
See other posts from Stack Overflow
or by Sean
Published on 2010-12-26T05:32:18Z
Indexed on
2010/12/26
5:54 UTC
Read the original article
Hit count: 243
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>
© Stack Overflow or respective owner