Home > Javascript > How to change class name of an HTML element – javascript

How to change class name of an HTML element – javascript

You can change the class name using the below given code.

document.getElementById(“idElement”).setAttribute(“class”,”className”);

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Beginner's Guide....
Categories: Javascript Tags: ,
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.

Switch to our mobile site