eudeoliveira Postado Fevereiro 20, 2007 Denunciar Share Postado Fevereiro 20, 2007 <html><head><title>______Tectrade Comercial Ltda _______________________________________________________</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><script language="JavaScript" type="text/JavaScript"><!--function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);//--></script><style type="text/css"><!--.unnamed1 { border: thin solid #000000;}--></style></head><body bgcolor="#CCCCCC" background="corrente4.gif"> <script>function compute(obj) {obj.pt.value = eval(obj.q1.value)*(obj.preço.value)}function compute2(obj){obj.pt2.value = eval(obj.q2.value)*(obj.preco2.value)}function compute3(obj){obj.pt3.value = eval(obj.q3.value)*(obj.preco3.value)}function compute4(obj){obj.pt4.value = eval(obj.q4.value)*(obj.preco4.value)}</script><table width="101%" height="391" border="0"> <tr> <td> <div align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong>N°da cotação </strong></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>6</b></font></b></font></b></font></b></font> </div> <form name="form1" method="post" action=""> <table width="99%" border="0" class="unnamed1"> <tr> <td width="16%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Nome de sua Empresa: </b></font></td> <td width="19%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="textfield" type="text" value="Rexnord " size="30"> </b></font></td> <td width="16%"> </td> <td width="25%"> </td> <td width="11%"><div align="right"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data:</strong></font></div></td> <td width="13%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>20</b></font></b></font></b></font></b></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>/02</b></font></b></font></b></font></b></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>/2007</b></font></b></font></b></font></b></font></td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Contato:</b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="nome" type="text" id="nome2" value="Alessandra" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Depto:</b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="depto" type="text" id="depto2" value="Compras" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Telefone de contato: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="telefone" type="text" id="telefone2" value="(51)6854-9532" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Fax: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="fax" type="text" id="fax2" value="(51)6854-0012" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Endereço: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="endereco" type="text" id="endereco2" value="R:ALvares de toledo , 521" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Cidade: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="cidade" type="text" id="cidade2" value="RS" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Seu Email: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="email" type="text" id="email2" value="alessandra@rexnord.com.br" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="unnamed1"> <td> <div align="center"><strong><font size="3" face="Tahoma">Quantidade<font color="#FFFFFF"></font></font></strong></div></td> <td> <div align="center"><strong><font size="3" face="Tahoma"><font color="#FFFFFF"><font color="#000000">Unidade</font></font></font></strong></div></td> <td> <div align="center"><strong><font size="3" face="Tahoma">Produto<font color="#FFFFFF"></font></font></strong></div></td> <td> <div align="center"><strong><font size="3" face="Tahoma"> Descrição / Modelo</font></strong></div></td> <td><div align="center"><strong><font size="3" face="tahoma">Preço unid</font></strong></div></td> <td><div align="center"><strong><font size="3" face="tahoma">Preço Total </font></strong></div></td> </tr> <tr> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q1" type="text" id="q12" size="6" value="02"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID" type="text" id="UNID5" value="muito" size="6"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P1" type="text" id="P12" value="Corrente"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D1" type="text" id="D12" value="Corrente Ansi 80/3 rebitada" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preço" type="text" id="preco14" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt" type="text" id="pt5" onblur="compute(this.form)" size="10"> </b></font></b></font></b></font></div></td> </tr> <tr> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q2" type="text" id="q22" size="6" value="22"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID2" type="text" id="UNID22" size="6" value="PC"> </b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P2" type="text" id="P22" value="Acoplamento"> </b></font></b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D2" type="text" id="D22" value="E20-M Rex Omega" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preco2" type="text" id="preco22" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt2" type="text" id="pt22" onblur="compute2(this.form)" size="10"> </b></font></b></font></b></font></div></td> </tr> <tr> <td height="26"> <div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q3" type="text" id="q32" size="6" value="12"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID3" type="text" id="UNID32" size="6" value="PC"> </b></font></b></font></b></font> </b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P3" type="text" id="P32" value="Emenda"> </b></font></b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D3" type="text" id="D32" value="Emenda Din 08B2" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preco3" type="text" id="preco32" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt3" type="text" id="pt32" size="10" onblur="compute3(this.form)"> </b></font></b></font></b></font></div></td> </tr> <tr> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q4" type="text" id="q42" size="6" value="42"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID4" type="text" id="UNID42" size="6" value="PC"> </b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P4" type="text" id="P42" value="Elemento"> </b></font></b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D4" type="text" id="D42" value="E10-M REx Omega" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preco4" type="text" id="preco42" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt4" type="text" id="pt42" size="10" onblur="compute4(this.form)"> </b></font></b></font></b></font></div></td> </tr> <tr> <td height="26"> <div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data entrega:</strong></font></div></td> <td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"> <input name="entrega" type="text" id="entrega" size="30"> </font></div></td> <td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">ICMS(%)</font></strong></div></td> <td> <div align="left"> <input name="icms" type="text" id="icms" size="10"> </div></td> <td><div align="left"></div></td> <td> </td> </tr> <tr> <td height="28"> <div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data Pagamento:</strong></font></div></td> <td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"> <input name="pagamento" type="text" id="pagamento" size="30"> </font></div></td> <td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">IPI(%)</font></strong></div></td> <td> <div align="left"> <input name="ipi" type="text" id="ipi" size="10"> </div></td> <td><div align="left"></div></td> <td> </td> </tr> <tr> <td><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Validade proposta: </strong></font></div></td> <td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font color="#FFFFFF"> <input name="validade" type="text" id="validade" size="30"> </font></b></font></div></td> <td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Frete</font></strong></div></td> <td> <div align="left"> <input name="frete" type="text" id="frete" size="10"> </div></td> <td><div align="left"></div></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> </b></font></b></font></b></font></td> </tr> <tr> <td><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Emitente:</font></strong></td> <td> <div align="left"> <input name="emitente" type="text" id="emitente" size="30"> </div></td> <td><input type="hidden" name="id_cod" value="6"></td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td><div align="center"></div></td> <td> <div align="right"> <input type="submit" name="Submit" value="Cotar"> </div></td> <td> </td> <td> </td> <td> </td> </tr> </table> </form> <p align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"> </font></p></td> </tr></table></body></html></html>Gostaria de saber porque não funciona quando querro fazer uma soma?<script>function compute(obj) {obj.pt.value = eval(obj.q1.value)*(obj.preço.value)}function compute2(obj){obj.pt2.value = eval(obj.q2.value)*(obj.preco2.value)}function compute3(obj){obj.pt3.value = eval(obj.q3.value)*(obj.preco3.value)}function compute4(obj){obj.pt4.value = eval(obj.q4.value)*(obj.preco4.value)}function compute5(obj){obj.total.value = eval(obj.pt.value)+(obj.pt2.value)+(obj.pt3.value)+(obj.pt4.value)}</script>so que o codigo não soma o valor total dos 4 itens??se alguém puder me ajudar eu agradeco..e se tiver um meio facil de fazer com que os valores sejam cauculador em real..pois não manjo nada de java script.. Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 .Andreia. Postado Fevereiro 21, 2007 Denunciar Share Postado Fevereiro 21, 2007 Tenta aí:<html> <head> <title>______Tectrade Comercial Ltda _______________________________________________________</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <style type="text/css"> <!-- .unnamed1 { border: thin solid #000000; } --> </style> </head> <body bgcolor="#CCCCCC" background="corrente4.gif"> <script> function compute(obj) {obj.pt.value = eval(obj.q1.value)*(obj.preço.value)} function compute2(obj) {obj.pt2.value = eval(obj.q2.value)*(obj.preco2.value)} function compute3(obj) {obj.pt3.value = eval(obj.q3.value)*(obj.preco3.value)} function compute4(obj) {obj.pt4.value = eval(obj.q4.value)*(obj.preco4.value)} </script> <table width="101%" height="391" border="0"> <tr> <td> <div align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong>N°da cotação </strong></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>6</b></font></b></font></b></font></b></font> </div> <form name="form1" method="post" action=""> <table width="99%" border="0" class="unnamed1"> <tr> <td width="16%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Nome de sua Empresa: </b></font></td> <td width="19%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="textfield" type="text" value="Rexnord " size="30"> </b></font></td> <td width="16%"> </td> <td width="25%"> </td> <td width="11%"><div align="right"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data:</strong></font></div></td> <td width="13%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>20</b></font></b></font></b></font></b></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>/02</b></font></b></font></b></font></b></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>/2007</b></font></b></font></b></font></b></font></td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Contato:</b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="nome" type="text" id="nome2" value="Alessandra" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Depto:</b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="depto" type="text" id="depto2" value="Compras" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Telefone de contato: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="telefone" type="text" id="telefone2" value="(51)6854-9532" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Fax: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="fax" type="text" id="fax2" value="(51)6854-0012" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Endereço: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="endereco" type="text" id="endereco2" value="R:ALvares de toledo , 521" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Cidade: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="cidade" type="text" id="cidade2" value="RS" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Seu Email: </b></font></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="email" type="text" id="email2" value="alessandra@rexnord.com.br" size="30"> </b></font></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr class="unnamed1"> <td> <div align="center"><strong><font size="3" face="Tahoma">Quantidade<font color="#FFFFFF"></font></font></strong></div></td> <td> <div align="center"><strong><font size="3" face="Tahoma"><font color="#FFFFFF"><font color="#000000">Unidade</font></font></font></strong></div></td> <td> <div align="center"><strong><font size="3" face="Tahoma">Produto<font color="#FFFFFF"></font></font></strong></div></td> <td> <div align="center"><strong><font size="3" face="Tahoma"> Descrição / Modelo</font></strong></div></td> <td><div align="center"><strong><font size="3" face="tahoma">Preço unid</font></strong></div></td> <td><div align="center"><strong><font size="3" face="tahoma">Preço Total </font></strong></div></td> </tr> <tr> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q1" type="text" id="q12" size="6" value="02"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID" type="text" id="UNID5" value="muito" size="6"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P1" type="text" id="P12" value="Corrente"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D1" type="text" id="D12" value="Corrente Ansi 80/3 rebitada" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preço" type="text" id="preco14" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt" type="text" id="pt5" onblur="compute(this.form)" size="10"> </b></font></b></font></b></font></div></td> </tr> <tr> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q2" type="text" id="q22" size="6" value="22"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID2" type="text" id="UNID22" size="6" value="PC"> </b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P2" type="text" id="P22" value="Acoplamento"> </b></font></b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D2" type="text" id="D22" value="E20-M Rex Omega" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preco2" type="text" id="preco22" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt2" type="text" id="pt22" onblur="compute2(this.form)" size="10"> </b></font></b></font></b></font></div></td> </tr> <tr> <td height="26"> <div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q3" type="text" id="q32" size="6" value="12"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID3" type="text" id="UNID32" size="6" value="PC"> </b></font></b></font></b></font> </b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P3" type="text" id="P32" value="Emenda"> </b></font></b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D3" type="text" id="D32" value="Emenda Din 08B2" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preco3" type="text" id="preco32" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt3" type="text" id="pt32" size="10" onblur="compute3(this.form)"> </b></font></b></font></b></font></div></td> </tr> <tr> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="q4" type="text" id="q42" size="6" value="42"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="UNID4" type="text" id="UNID42" size="6" value="PC"> </b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="P4" type="text" id="P42" value="Elemento"> </b></font></b></font></b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="D4" type="text" id="D42" value="E10-M REx Omega" size="40"> </b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="preco4" type="text" id="preco42" size="10"> </b></font></b></font></b></font></div></td> <td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> <input name="pt4" type="text" id="pt42" size="10" onblur="compute4(this.form)"> </b></font></b></font></b></font></div></td> </tr> <tr> <td height="26"> <div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data entrega:</strong></font></div></td> <td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"> <input name="entrega" type="text" id="entrega" size="30"> </font></div></td> <td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">ICMS(%)</font></strong></div></td> <td> <div align="left"> <input name="icms" type="text" id="icms" size="10"> </div></td> <td><div align="left"></div></td> <td> </td> </tr> <tr> <td height="28"> <div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data Pagamento:</strong></font></div></td> <td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"> <input name="pagamento" type="text" id="pagamento" size="30"> </font></div></td> <td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">IPI(%)</font></strong></div></td> <td> <div align="left"> <input name="ipi" type="text" id="ipi" size="10"> </div></td> <td><div align="left"></div></td> <td> </td> </tr> <tr> <td><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Validade proposta: </strong></font></div></td> <td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font color="#FFFFFF"> <input name="validade" type="text" id="validade" size="30"> </font></b></font></div></td> <td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Frete</font></strong></div></td> <td> <div align="left"> <input name="frete" type="text" id="frete" size="10"> </div></td> <td><div align="left"></div></td> <td><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b> </b></font></b></font></b></font></td> </tr> <tr> <td><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Emitente:</font></strong></td> <td> <div align="left"> <input name="emitente" type="text" id="emitente" size="30"> </div></td> <td><input type="hidden" name="id_cod" value="6"></td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td><div align="center"></div></td> <td> <div align="right"> <input type="submit" name="Submit" value="Cotar"> </div></td> <td> </td> <td> </td> <td> </td> </tr> </table> </form> <p align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"> </font></p></td> </tr> </table> </body> </html> </html> <script> function compute(obj) {obj.pt.value = eval(obj.q1.value)*(obj.preço.value)} function compute2(obj) {obj.pt2.value = eval(obj.q2.value)*(obj.preco2.value)} function compute3(obj) {obj.pt3.value = eval(obj.q3.value)*(obj.preco3.value)} function compute4(obj) {obj.pt4.value = eval(obj.q4.value)*(obj.preco4.value)} function compute5(obj) {obj.total.value = eval(obj.pt.value)+(obj.pt2.value)+(obj.pt3.value)+(obj.pt4.value)}</script> Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 eudeoliveira Postado Março 16, 2007 Autor Denunciar Share Postado Março 16, 2007 Como faço para caucula o valor em casas decimais...dezena = , e milhar = . se alguém puder me ajudar agradeço.. Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
eudeoliveira
<html>
<head>
<title>______Tectrade Comercial Ltda _______________________________________________________</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.unnamed1 {
border: thin solid #000000;
}
-->
</style>
</head>
<body bgcolor="#CCCCCC" background="corrente4.gif">
<script>
function compute(obj)
{obj.pt.value = eval(obj.q1.value)*(obj.preço.value)}
function compute2(obj)
{obj.pt2.value = eval(obj.q2.value)*(obj.preco2.value)}
function compute3(obj)
{obj.pt3.value = eval(obj.q3.value)*(obj.preco3.value)}
function compute4(obj)
{obj.pt4.value = eval(obj.q4.value)*(obj.preco4.value)}
</script>
<table width="101%" height="391" border="0">
<tr>
<td>
<div align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong>N°da
cotação </strong></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>6</b></font></b></font></b></font></b></font>
</div>
<form name="form1" method="post" action="">
<table width="99%" border="0" class="unnamed1">
<tr>
<td width="16%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Nome
de sua Empresa: </b></font></td>
<td width="19%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="textfield" type="text" value="Rexnord " size="30">
</b></font></td>
<td width="16%"> </td>
<td width="25%"> </td>
<td width="11%"><div align="right"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data:</strong></font></div></td>
<td width="13%"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>20</b></font></b></font></b></font></b></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>/02</b></font></b></font></b></font></b></font><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>/2007</b></font></b></font></b></font></b></font></td>
</tr>
<tr>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Contato:</b></font></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="nome" type="text" id="nome2" value="Alessandra" size="30">
</b></font></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Depto:</b></font></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="depto" type="text" id="depto2" value="Compras" size="30">
</b></font></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Telefone
de contato: </b></font></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="telefone" type="text" id="telefone2" value="(51)6854-9532" size="30">
</b></font></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Fax:
</b></font></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="fax" type="text" id="fax2" value="(51)6854-0012" size="30">
</b></font></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Endereço:
</b></font></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="endereco" type="text" id="endereco2" value="R:ALvares de toledo , 521" size="30">
</b></font></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Cidade:
</b></font></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="cidade" type="text" id="cidade2" value="RS" size="30">
</b></font></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>Seu
Email: </b></font></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="email" type="text" id="email2" value="alessandra@rexnord.com.br" size="30">
</b></font></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="unnamed1">
<td> <div align="center"><strong><font size="3" face="Tahoma">Quantidade<font color="#FFFFFF"></font></font></strong></div></td>
<td> <div align="center"><strong><font size="3" face="Tahoma"><font color="#FFFFFF"><font color="#000000">Unidade</font></font></font></strong></div></td>
<td> <div align="center"><strong><font size="3" face="Tahoma">Produto<font color="#FFFFFF"></font></font></strong></div></td>
<td> <div align="center"><strong><font size="3" face="Tahoma"> Descrição
/ Modelo</font></strong></div></td>
<td><div align="center"><strong><font size="3" face="tahoma">Preço
unid</font></strong></div></td>
<td><div align="center"><strong><font size="3" face="tahoma">Preço
Total </font></strong></div></td>
</tr>
<tr>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="q1" type="text" id="q12" size="6" value="02">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="UNID" type="text" id="UNID5" value="muito" size="6">
</b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="P1" type="text" id="P12" value="Corrente">
</b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="D1" type="text" id="D12" value="Corrente Ansi 80/3 rebitada" size="40">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="preço" type="text" id="preco14" size="10">
</b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="pt" type="text" id="pt5" onblur="compute(this.form)" size="10">
</b></font></b></font></b></font></div></td>
</tr>
<tr>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="q2" type="text" id="q22" size="6" value="22">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="UNID2" type="text" id="UNID22" size="6" value="PC">
</b></font></b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="P2" type="text" id="P22" value="Acoplamento">
</b></font></b></font></b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="D2" type="text" id="D22" value="E20-M Rex Omega" size="40">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="preco2" type="text" id="preco22" size="10">
</b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="pt2" type="text" id="pt22" onblur="compute2(this.form)" size="10">
</b></font></b></font></b></font></div></td>
</tr>
<tr>
<td height="26"> <div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="q3" type="text" id="q32" size="6" value="12">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="UNID3" type="text" id="UNID32" size="6" value="PC">
</b></font></b></font></b></font> </b></font></b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="P3" type="text" id="P32" value="Emenda">
</b></font></b></font></b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="D3" type="text" id="D32" value="Emenda Din 08B2" size="40">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="preco3" type="text" id="preco32" size="10">
</b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="pt3" type="text" id="pt32" size="10" onblur="compute3(this.form)">
</b></font></b></font></b></font></div></td>
</tr>
<tr>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="q4" type="text" id="q42" size="6" value="42">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="UNID4" type="text" id="UNID42" size="6" value="PC">
</b></font></b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="P4" type="text" id="P42" value="Elemento">
</b></font></b></font></b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="D4" type="text" id="D42" value="E10-M REx Omega" size="40">
</b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="preco4" type="text" id="preco42" size="10">
</b></font></b></font></b></font></div></td>
<td><div align="center"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
<input name="pt4" type="text" id="pt42" size="10" onblur="compute4(this.form)">
</b></font></b></font></b></font></div></td>
</tr>
<tr>
<td height="26"> <div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data
entrega:</strong></font></div></td>
<td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif">
<input name="entrega" type="text" id="entrega" size="30">
</font></div></td>
<td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">ICMS(%)</font></strong></div></td>
<td> <div align="left">
<input name="icms" type="text" id="icms" size="10">
</div></td>
<td><div align="left"></div></td>
<td> </td>
</tr>
<tr>
<td height="28"> <div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Data
Pagamento:</strong></font></div></td>
<td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif">
<input name="pagamento" type="text" id="pagamento" size="30">
</font></div></td>
<td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">IPI(%)</font></strong></div></td>
<td> <div align="left">
<input name="ipi" type="text" id="ipi" size="10">
</div></td>
<td><div align="left"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Validade
proposta: </strong></font></div></td>
<td><div align="left"><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font color="#FFFFFF">
<input name="validade" type="text" id="validade" size="30">
</font></b></font></div></td>
<td><div align="right"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Frete</font></strong></div></td>
<td> <div align="left">
<input name="frete" type="text" id="frete" size="10">
</div></td>
<td><div align="left"></div></td>
<td><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b><font size="2" face="verdana, arial, helvetica, sans-serif"><b>
</b></font></b></font></b></font></td>
</tr>
<tr>
<td><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Emitente:</font></strong></td>
<td> <div align="left">
<input name="emitente" type="text" id="emitente" size="30">
</div></td>
<td><input type="hidden" name="id_cod" value="6"></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="center"></div></td>
<td> <div align="right">
<input type="submit" name="Submit" value="Cotar">
</div></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
<p align="left"><font size="2" face="verdana, arial, helvetica, sans-serif">
</font></p></td>
</tr>
</table>
</body>
</html>
</html>
Gostaria de saber porque não funciona quando querro fazer uma soma?
<script>
function compute(obj)
{obj.pt.value = eval(obj.q1.value)*(obj.preço.value)}
function compute2(obj)
{obj.pt2.value = eval(obj.q2.value)*(obj.preco2.value)}
function compute3(obj)
{obj.pt3.value = eval(obj.q3.value)*(obj.preco3.value)}
function compute4(obj)
{obj.pt4.value = eval(obj.q4.value)*(obj.preco4.value)}
function compute5(obj)
{obj.total.value = eval(obj.pt.value)+(obj.pt2.value)+(obj.pt3.value)+(obj.pt4.value)}</script>
so que o codigo não soma o valor total dos 4 itens??
se alguém puder me ajudar eu agradeco..
e se tiver um meio facil de fazer com que os valores sejam cauculador em real..
pois não manjo nada de java script..
Link para o comentário
Compartilhar em outros sites
2 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.