I have assigned a task to add two textbox values.I want the result of addition to appear in the 3rd textbox,as soon as enter the values in the first two textboxes,without pr
Since eval("3+2")=5 ,you can use it as following :
eval("3+2")=5
byId=(id)=>document.getElementById(id); byId('txt3').value=eval(`${byId('txt1').value}+${byId('txt2').value}`)
By that, you don't need parseInt
parseInt
Well, base on your code, you would put onkeyup=sum() in each text box txt1 and txt2