JavaScript erhalten Sie Klassenname
document.getElementById("myDIV").className = "mystyle";
Envious Emu
document.getElementById("myDIV").className = "mystyle";
myObj.constructor.name
class Language {
getClassName() {
return this.constructor.name;
}
}
const l1 = new Language ();
const objClassName = l1.getClassName();
console.log(objClassName);
String className = this.getClass().getSimpleName();
document.getElementsByClassName("legend").style.display="none";