I want to change a css property of a HTML element using Javascript. I can't find a solution to my problem. I would like to use the element with the id of CreateMenu, and apply the variable called value to the property specified by the type variable, but it doesn't seem to support variables.
edit: Type is the variable i want to use to get which property i want to edit.
function style(name, type, value) {
document.getElementById("CreateMenu").style.type = value;
}
.type... there may be one[type]though