how to add two number using jqueryu

JavaScript
var a=parseInt($("#d1").val());
var b=parseInt($("#d2").val());
var sum=a+b;
alert($(sum));
Source

Also in JavaScript: