[Resolvido] Soma nos input em php + jQuery
E ai pessoal nao sei se aqui é o lugar certo de postar eu procurei em varios forum e nao achei um jeito ou uma ideia de fazer isso
tenho um formulario e nesse formulario tenho a opcao de selecionar a porcentagem e o usuario coloca valores nos campos e o total ja gera automatico
o valor final...
o cara selecionae 30%
pericia = R$ 20.00
Correios = R$ 50.00
B.O = R$ 60.00
total 20+50+60+30% = R$169.00
alguem pode me ajudar nesse problema....
<H3>CADASTRO DE ATENDIMENTO</H3><br />
<form action="" method="post">
<fieldset>
<legend>DESPESAS</legend>
<label><span>Porcentagem:</span><select name="porcentagem">
<option>Selecione</option>
<option>30%</option>
<option>25%</option>
<option>20%</option>
</select></label>
<label><span>Perícia - R{:content:}lt;/span><input type="text" name="pericia" /><span style="margin-left:100px;" >P.H - R{:content:}lt;/span><input type="text" name="ph" /></label></label>
<label><span>Cart. - R{:content:}lt;/span><input type="text" name="cart" /><span style="margin-left:100px;" >B.O - R{:content:}lt;/span><input type="text" name="bo" /></label></label>
<label><span>Correios - R{:content:}lt;/span><input type="text" name="correios" /><span style="margin-left:100px;" >Outros - R{:content:}lt;/span><input type="text" name="outros" /></label></label>
<label><span>Total:</span><input type="text" size="20" name="valor_total" disabled="disabled"/></label>
</label>
</fieldset>
</form>
Obrigado!!!
Discussão (23)
Carregando comentários...