0 votes
in Programming by (580 points)

Is it possible to put an innerHTML (or style.) Variable in DOM javascript? If not, is there a trick to making this possible?

In the following example:

<h1 id="id01">Old Heading</h1>
var element = document.getElementById("id01");
var newinner = "innerHTML";
element.newinner = "New Heading";

Please log in or register to answer this question.

...