I would like to change the class of HTML elements without the use of the ID tag because I have so many of these elements. I would like to have something simple like this but the code is not working.
<li ><a onclick="ChangeClass()" href="/Default.aspx">Home</a></li>
<script>
function ChangeClass(){
this.className = "active";
}
</script>
EDIT: Sorry, That was a type. My code did have the brackets but still isn't working.
EDIT2: Thanks for the quick replies, I will look at all of them and take notes.