Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 139953

how to get values of prefix id's in javascript

$
0
0

How to get prefix id values and check i.e. id defined or not, and how to store a value in variable.

calculate_grand_total();
}

function calculate_grand_total() {
  var rowcount = $("#hidden_rowcount").val();
  var grand_total = parseFloat(0);
  for (i = 0; i < rowcount; i++) {
    grand_total += parseFloat($("#gtl_" + i).val());
  }
  $("#totalamt").html(grand_total);

}

If one of the id is missing that time it should not printing


Viewing all articles
Browse latest Browse all 139953

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>