I want to change the style of an element created using document.createElement("button")
.
I tried using:
element.style.width = "50px"
However, the style field cannot be found.
I want to change the style of an element created using document.createElement("button")
.
I tried using:
element.style.width = "50px"
However, the style field cannot be found.
The
Element
needs to be cast to the more specificHTMLElement
type: