glicose Posted December 1, 2009 at 12:35 PM Report Share #298202 Posted December 1, 2009 at 12:35 PM Olá, eu tenho o seguinte código: function addacao(divName){ var newdiv = document.createElement('div'); newdiv.innerHTML = '<input type="hidden" name="acao" value="I">'; document.getElementById(divName).appendChild(newdiv); } O que eu queria era colocar outro parametro addacao(divName, acao) e passar o valor do parâmetro acao pro value do input hidden Se alguém puder ajudar... Valeu Link to comment Share on other sites More sharing options...
scorch Posted December 1, 2009 at 01:23 PM Report Share #298211 Posted December 1, 2009 at 01:23 PM Não será isto: function addacao(divName, acao){ var newdiv = document.createElement('div'); newdiv.innerHTML = '<input type="hidden" name="acao" value="' + acao + '">'; document.getElementById(divName).appendChild(newdiv); } PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum. Link to comment Share on other sites More sharing options...
glicose Posted December 1, 2009 at 02:13 PM Author Report Share #298218 Posted December 1, 2009 at 02:13 PM Valeu, era isso mesmo 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now