Created
September 13, 2019 18:40
-
-
Save wilcorrea/99c194bdce524d258b78f93fea04510c 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
| window.procutList5 = [] | |
| function add5(quantidade_equipe = undefined, funcaoo = undefined) { | |
| var quantidade = quantidade_equipe || document.getElementById("quantidade_equipe").value | |
| var funcao = funcaoo || document.getElementById("funcaoo").value | |
| window.procutList5.push({ quantidade, funcao }) | |
| var list = window.procutList5.map(function (item, index) { | |
| return `<li>${item.funcao} ${item.quantidade} | |
| <input | |
| type="hidden" | |
| name="funcaoo[${index}]" | |
| value="${item.funcao}" | |
| > | |
| <input | |
| type="hidden" | |
| name="quantidade_equipe[${index}]" | |
| value="${item.quantidade}" | |
| > | |
| </li>` | |
| }).join('') | |
| document.getElementById("list5").innerHTML = list | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment