Skip to content

Instantly share code, notes, and snippets.

@camilamoreiradev
Created April 2, 2020 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save camilamoreiradev/3f27f241d75456a25c61722bdb1e4de4 to your computer and use it in GitHub Desktop.
Save camilamoreiradev/3f27f241d75456a25c61722bdb1e4de4 to your computer and use it in GitHub Desktop.
//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