135
rated 0 times
[
139]
[
4]
/ answers: 1 / hits: 47884
/ 11 Years ago, thu, june 27, 2013, 12:00:00
Following code shows error Uncaught TypeError: Cannot set property 'className' of null
<style>
.deactive { height:250px; }
.active { height:150px; }
</style>
<script>
function click(div) {
document.getElementById('div').className = 'active';
}
</script>
<a href=# onclick=click(Division);>
<div id=Division class=deactive>
<!--Division contents-->
</div>
</a>
i am trying pass id of division to js function by on click event of anchor tag.. and i want to change the class name of the division,
help me to identify the error..
More From » html