Hi Richa,
Please try the following updated code,
<script>
$(function () {
$("[id*=txtText1],[id*=txtText2],[id*=txtText3]").focusout(function () {
$(this).val(FormatNumber($(this).val().replace(/,/g, "")));
});
function FormatNumber(str) {
return str.lastIndexOf('.') == -1 ? (str.length > 3 ? FormatNumber(str.substr(0, str.length - 3)) + ',' + str.substr(str.length - 3) : str) : (str.lastIndexOf('.') > 3 ? FormatNumber(str.substr(0, str.lastIndexOf('.') - 3)) + ',' + str.substr(str.lastIndexOf('.') - 3) : str);
}
});
</script>
Thanks and Regards,
Rk_hirpara