I have some difficulties with JavaScript. I want to add some fields from my "Input List" and multiply others by clicking on a "Calculate Button", thus informing a value in an "Input Text". Nothing else I do has worked, please if anyone can help me.
Preço:
<input type="text" name="preco"><br />
<button>Comprar</button>
<form id="pizza3">
<p>Tamanho da Pizza:</p>
<input list="tmhpizza" name="tmhpizza" required />
<datalist id="tmhpizza">
<option value="Brotinho">R$20,00</option>
<option value="Pequena">R$45,00</option>
<option value="Média">R$70,00</option>
<option value="Grande">R$95,00</option>
<option value="Gigante">R$120,00</option>
</datalist>
<p>Quantidade de Pizzas:</p>
<input list="qntpizza" name="qntpizza" required />
<datalist id="qntpizza">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</datalist>
<p>Tamanho do Refrigerante:</p>
<input list="tmhrefri" name="tmhrefri" required />
<datalist id="tmhrefri">
<option value="350ml">R$4,50</option>
<option value="750ml">R$6,30</option>
<option value="1L">R$8,10</option>
<option value="2L">R$9,90</option>
<option value="2,5L">R$11,70</option>
</datalist>
<p>Quantidade de Refrigerante:</p>
<input list="qntrefri" name="qntrefri" required />
<datalist id="qntrefri">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</datalist><br />
<input type="button" name="voltar" value="Voltar" />
<button>Calcular</button>