I am trying to set id name as special character not working.but without special character it is working fine.
id name 100 is working.
but batch/100 not working.
function calculateSum(){
var id_name='100';
var id_special_chrs='batch/100';
var total =document.getElementById("total").value;
var sub =document.getElementById("sub").value;
$("#"+id_name).val((total)-(sub ));
$("#"+id_special_chrs).val((total)-(sub ));
}
<input type="text" value="500" id="total">
<input type="text" value="500" id="sub">
<input type="text" id="100" onKeyup='calculateSum("+id+")' >
<input type="text" id="batch/100" onKeyup='calculateSum("+id+")'>