I have a form that changes its name constantly, and I want to give the submit in it by a function. In this function "changes" it gets the name of the form, but this way I did it does not work. The "+ ide +" of the form is a random number, so move it to the "change" function. If someone can help me and explain how to make it work what I want to do.
<form method='get' action='GG.php' name='alteracao"+ide+"'>
<button onclick='altera(alteracao"+ide+")'>Enviar</button>
</form>
function altera(ide){
document.ide.submit();
}