Showing posts with label payroll in javascript. Show all posts
Showing posts with label payroll in javascript. Show all posts

Thursday, October 29, 2015

Payroll in JavaScript

A simple payroll program that I wrote in JavaScript to compute the salary of the employee. The code is very simple and easy to understand.

If you  have some questions please send me an email at jake.r.pomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing

<html>
<head>
  <title>Swapping of Numbers</title>
</head>
<style>
h3 {
   font-family:arial;
   };
</style>
<body>
  <script>
    
var val_1 = parseInt(prompt("Enter First Value : "));
var val_2 = parseInt(prompt("Enter Second Value : "));
    var temp=0;
document.write("<h3> Swapping of Numbers</h3>");
document.write("<h3> BEFORE SWAPPING </h3>");
document.write("<font face='arial' size='3'>");
    document.write(" First Value    : " + val_1 + ".</font><br>");
document.write("<font face='arial' size='3'>");
    document.write(" Second Value   : " + val_2 + ".</font><br>");
 
temp = val_1;
     val_1 = val_2;
     val_2 = temp;
               
    document.write("<h3> AFTER SWAPPING</h3>");
document.write("<font face='arial' size='3'>");
    document.write(" First Value      : " + val_1 + ".</font><br>");
document.write("<font face='arial' size='3'>");
    document.write(" Second Value     : " + val_2 + ".</font><br>");

document.write("<h3> End of Program </h3>");
</script>
</body>

</html>