Tuesday, August 17, 2021

JavaScript Round off and other

 

//JavaScript Round off and other

var tot_amt = document.getElementById("ContentPlaceHolder1_txt_w_total_tax");

        var net_amt = document.getElementById("ContentPlaceHolder1_txtBAmt");

        var dis_w_per = document.getElementById("ContentPlaceHolder1_txt_W_Dis_Per");

        var dis_w = document.getElementById("ContentPlaceHolder1_txt_W_Dis");

        dis_w_per.addEventListener("keyup", () => {

            //alert("keyup");

            dis_w.value = (tot_amt.value * dis_w_per.value / 100.0);

            var net_amt_ = tot_amt.value - dis_w.value

            net_amt.value = net_amt_.toFixed(2);

        })

No comments:

Post a Comment

Linq Expression syntax for where condtion in linq

(Expression<Func<T, bool>> filter)