I am trying to add two values of alert boxes but I keep getting a blank alert box. I don't know why.
$(document).ready(function(){
var a = $("#a").val();
var b = $("#b").val();
$("submit").on("click", function(){
var sum = a + b;
alert(sum);
})
})
See Question&Answers more detail:os