Created
July 12, 2019 05:16
-
-
Save rakeshsoni18/d22ca62233acbdf121e8d4db039e4f1a to your computer and use it in GitHub Desktop.
Foreach in javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input type="text" name="sdms[]"> | |
| <script> | |
| $(document).on("keyup", ".sdms", function() { | |
| var sum = 0; | |
| $(".sdms").each(function(){ | |
| sum += +$(this).val(); | |
| }); | |
| document.getElementById("corporate").innerHTML = sum; | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment