Advertisement
contatowellington

Untitled

Nov 11th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <script type="text/javascript">
  2. function mostrar(btn) {
  3. const div = btn.closest('div');
  4. var t1 = div.querySelector('[name="tx1"]').value;
  5. var t2 = div.querySelector('[name="tx2"]').value;
  6. var t3 = div.querySelector('[name="tx3"]').value;
  7. document.getElementById('v1').value = t1;
  8. document.getElementById('v2').value = t2;
  9. document.getElementById('v3').value = t3;
  10. }
  11. </script>
  12.  
  13.  
  14. <div>
  15. <input name="tx1" onfocus="mostrar(btn);" type="text" value="<?php echo $row_Produtos1['peso']; ?>" />
  16. <input name="tx2" type="text" value="1" />
  17. <input name="tx3" type="text" value="<?php echo $row_Produtos1['preco']; ?>" /><br />
  18. <input name="totaliza" type="text" id="totaliza" value="" /><br />
  19.  
  20. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement