OK, I'm new at JavaScript, but I'm trying to change the innerHTML
of a div
element.
Here is my script that is not working:
<head>
<script type="text/javascript">
function var1() {
document.getElementById('test').innerHTML = 'hi';
}
window.onLoad = var1();
</script>
</head>
<body>
<div id="test">change</div>
</body>
It should work, but for some reason it does not, any help?