1
All right guys ?
So, I have a field of type Hidden, I need to assign a value to it and change it from Hidden to text after the calculation
function calc(){
var myVar = formCalc.myCamp.value;
document.getElementById("calcFeito").value = myVar*2;
document.getElementsByTagName("hidden").setAttribute("type", "text");
}
<form name="formCalc">
<br>Digite o Valor:<br>
<input type="text" name="myCalc">
<input type="button" value="botão" onClick="calc()"></button><br>
</form>
<input type='hidden' id='calcFeito'>
Good evening, something missing in the answer? It solved your problem?
– Guilherme Nascimento
I forgot to mark as sure, sorry, corrected by @Guilhermenascimento
– lipesmile
Imagine, I am grateful :)
– Guilherme Nascimento