+ 2
How to get sum of multiple textbox values using only java script
Hi, I'm working on a project in which I need to sum about 12 text box values onkeyup event using JavaScript Plz help me.. Thanks in advance
7 Antworten
+ 4
You will get the result when you keyup in last box.
get last box
As
var last = document.getElementById("lastdiv");
last.addEventListener("keyup",()=>{
//Get value of all boxes using
.value as na,bb,nc,.....
var sum = na+nb+nc+.....;
Console.log(sum);
});
If it's not clear to you first complete dom of js.
You have started js it not mean that you can do everything in js.
If you completed js then you can do anything there . So firstly go through it.
+ 3
Hi what is your attempt so far ,can we see the code so we can guide you better ?
+ 1
rudolph flash yes I understand the code... Actually u gave me what I wanted...
0
Thanks rudolph flash , I'll try this code, I hope it may work for me..