Is there a way to setAttribute()
on an element where the attribute name can be camelCase..!?
eg:
present: element.setAttribute("myAttr","myattrValue");
results: <p myattr="myattrValue"/>
Can the attribute be set in the camelCase..?
looking for something like: <p myAttr="myattrValue"/>
elementNamespaceURI : xhtml/1999
Edit:
another example: <input type="text" onClick="func()"/>
is what I am looking for, where as
<input type="text"/>
will be given as source, and have to setAttribute()..
which is onClick
but now it's onclick...!
"Onclick", is just an example to showcase, where both onClick
& onclick
will yield same result..But the need is attribute camelCase as it is set!
Help me find solution...!