Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `@Html.DropDownListFor(x => x.idResponsaveis, Model.responsaveis)
- <input type='button' value='Adicionar' onclick='adicionarResponsavel()' class='btn' />`
- function adicionarResponsavel(){
- var div = document.getElementById('listaResponsaveis');
- var node = document.createElement('div');
- node.setAttribute('id', 'div' + quantity);
- node.appendChild('@Html.DropDownListFor(x => x.idResponsaveis, Model.responsaveis)');
- div.appendChild(node);
- }
- node.appendChild('@Html.DropDownListFor(x => x.idResponsaveis, Model.responsaveis)');
- function adicionarResponsavel(){
- var div = document.getElementById('listaResponsaveis');
- var node = document.createElement('div');
- node.setAttribute('id', 'div' + quantity);
- var existingDropDownClone=$('#id-of-existing-select-box').clone();
- existingDropDownClone.appendTo($(node));
- }
Add Comment
Please, Sign In to add comment