Skip to content Skip to sidebar Skip to footer

Setattribute Makes The Attribute Name Lowercase

I create elements with the var l = document.createElement('label'); and I assign its attributes with l.setAttribute('formControlName','e');. The problem is that the setAttribute m

Solution 1:

Use this instead:

l.setAttributeNS(null, "formControlName","e");

'setAttributeNS()' doesn't convert the name to lower case.

Post a Comment for "Setattribute Makes The Attribute Name Lowercase"