Welcome Guest, Not a member yet? Register   Sign In
getElemntbyid returns undefined value

(08-27-2018, 10:18 PM)kaitenz Wrote: Have you tried "jQuery"?

Quote:jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML

It is free. Give it a try.

But if you prefer to stick with traditional JavaScript, then follow what InsiteFX said.

I tried but first row only affected.
echo '<td><input type="number" id="primaryincome" class="form-control" placeholder="0"> </td>';
<script type="text/javascript">
$("#primaryincome").click(function () {
    var primaryincome = $("#primaryincome").val();
   // var otherincome = $("#otherincome").val();
    var totalincome = parseInt(primaryincome) + parseInt(primaryincome);

Messages In This Thread
RE: getElemntbyid returns undefined value - by kvanaraj - 08-27-2018, 10:52 PM

Theme © iAndrew 2016 - Forum software by © MyBB