style in div tag
I have a phrase code:
<script language=javascript>
function setStyle(){
var i=300;
test.style.overflow="scroll";
test.style.background='red';
test.style.height=i;
}
</script>
<body onload=setStyle()>
<div id="test" >
aaa
bbb
</div>
</body>
But it is not working. Can you help me to make it run? Thank you very much.
<script language=javascript>
function setStyle(){
var i=300;
test.style.overflow="scroll";
test.style.background='red';
test.style.height=i;
}
</script>
<body onload=setStyle()>
<div id="test" >
aaa
bbb
</div>
</body>
But it is not working. Can you help me to make it run? Thank you very much.
April 29,