how to get element by class name javascript
document.getElementsByClassName("legend").style.display="none";
how to get element by class name javascript
document.getElementsByClassName("legend").style.display="none";
javascript get class name
document.getElementById("myDIV").className = "mystyle";
get name of class javascript
myObj.constructor.name
how get class name
String className = this.getClass().getSimpleName();
how to get class name of element in javascript
var spans = document.getElementsByTagName("span");
for (var i = 0; i < spans.length; i++) {
if (spans[i].className == 'xyz') {
spans[i].style.backgroundColor = '#000';
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us