I'm trying to put the value of "10" to the value of a variable, You will be able to open the button with this code but the value 10 (quantity of product) but not being changed, if I simply change the 10 by 20, when I open the button it will be 20 the quantity, however I want to change it with the script because I am creating a system that changes the values depending on the option selected.
<form method="post" target="pagseguro" action="https://pagseguro.uol.com.br/v2/checkout/payment.html">
<!-- Campos obrigatórios -->
<input name="receiverEmail" type="hidden" value="[email protected]">
<input name="currency" type="hidden" value="BRL">
<!-- Itens do pagamento (ao menos um item é obrigatório) -->
<input name="itemId1" type="hidden" value="001">
<input name="itemDescription1" type="hidden" value="EloJob">
<input name="itemAmount1" type="hidden" value = "100.00">
<input name="itemQuantity1" type="hidden" value="10">
<input name="itemWeight1" type="hidden" value="0">
<!-- Código de referência do pagamento no seu sistema (opcional) -->
<input name="reference" type="hidden" value="REF1234">
<!-- Dados do comprador (opcionais) -->
<input name="senderName" type="hidden" value="José Comprador">
<input name="senderAreaCode" type="hidden" value="11">
<input name="senderPhone" type="hidden" value="56273440">
<input name="senderEmail" type="hidden" value="[email protected]">
<!-- submit do form (obrigatório) -->
<input alt="Pague com PagSeguro" name="submit" type="image" src="https://p.simg.uol.com.br/out/pagseguro/i/botoes/pagamentos/120x53-pagar.gif"/></form><scripttype="text/javascript">
var randu = 20.00;
document.getElementById("10").value = randu;
</script>