<html> <head> <script> function electBill() { var last = 6700 var current = 6830 var totalUnit = current-last if(totalUnit>0 && totalUnit<=150) { var charges = totalUnit*4 document.write("Bill amount:" + charges ) } else if(totalUnit>=151 && totalUnit<=300) { var charges = totalUnit*6 document.write("Bill amount:" + charges ) } else if(totalUnit>300 && totalUnit<=500) { var charges = totalUnit*8 document.write("Bill amount:" + charges ) } else { var charges = totalUnit*10 document.write("Bill amount:" + charges ) } } </script> </head> <body> <input type="button" value="Go" onclick="electBill()"/> </body> </html>
Office no.- 401,Shekhar Central Building ,Palasiya, Pin-code:452001, Indore
contact@codebetter.in
+91 88230 75444, +91 99939 28766