Forked from camilamoreiradev/Set Multiple Atributtes JS
Created
February 3, 2023 06:32
-
-
Save theprincy/c8d9bb1974477784e62822555203dab1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//função | |
function setAttributes(el, attrs) { | |
for (var key in attrs) { | |
el.setAttribute(key, attrs[key]); | |
} | |
} | |
//chamada da função | |
setAttributes(inputFile, { "id": idName, "class": "scFormObjectOdd", "type": "text", "value": idName }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment