Search code examples
javascripthtmlappendchild

Why does IE10 say `Object doesn't support property or method 'appendchild'`


I have the following code in my JavaScript file :

col1.appendchild(X);

where x is an object and I am appending the entire thing to a tree. When I check the developer console in IE10, It says Object doesn't support property or method 'appendchild' The same code seems to be working just fine on IE10 on a different Computer but not this one. Any suggestions on how to get along with it are much appreciated!


Solution

  • JavaScript is case sensitive language. The correct name of the method is appendChild.

    MDN: https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild