0

To change the element inside a html tag using javascript,

<div id ="effect">change it</div> <button onclick="change()"></button> I used, function change() { document.getElementById("effect").innerHtml="effects work, changes done"; } not working in my case, correction, tips, hints, or understanding concepts, all this welcome here....

28th Jun 2017, 10:30 AM
ASHISH PANDEY
ASHISH PANDEY - avatar
2 Réponses
+ 12
The only thing that's creating problems is the 4th line of your JavaScript code. The problem is, it's not .innerHtml but .innerHTML html should be uppercased (HTML.)
28th Jun 2017, 10:42 AM
Dev
Dev - avatar