Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- jQuery(document).ready(function() {
- var values = $('#input_2_86,#input_2_129,#input_2_95,#input_2_96').change(function() {
- var sum = 0;
- values.each(function() { // Step through each one
- var value = parseInt($(this).val(), 10); // Retrieve its numeric value
- sum += (isNaN(value) ? 0 : value); // Add to the total
- });
- $('#input_2_88').val(sum / 4); // And show the average
- });
- });
- </script>
Add Comment
Please, Sign In to add comment