First think you get the Value of 5 Percentage is separate after You Add Caluclated Value
Your Textbox Enter : 250
Example: Logic Need Like this
250+ (250*5/100) = 262.5
function taxCalc(amount)
{
var sum = 0;
$(".amt").each(function () {
if (isNaN(this.value)) {
alert("Please enter numbers only");
return false;
}
if (!isNaN(this.value) && this.value.length != 0) {
sum += parseFloat(this.value);
}
});
var _txt2 = document.getElementById('<%= txtvat.ClientID %>');
var _txt3 = document.getElementById('<%= txtvatt.ClientID %>');
var t1=0, t2=0;
if(_txt2.value != "") t2=_txt2.value;
_txt3.value = parseFloat(sum)+(parseFloat(sum) * parseFloat(t2) / 100);
document.getElementById("<%=txtvatt.ClientID%>").value;
}