Program code – Employee Payship

A simple form and javascript based calculation.

<html>
<head>
<title> employee payship</title>
</head>
<body>
<script language="javascript">
function cal()
{
var a=parseInt(form1.text3.value);
var b=a*4/100;
var c=a*5/100;
var d=a+b+c;
form1.text4.value=b;
form1.text5.value=c;
form1.text6.value=d;
}
</script>
<form name=form1>
<h2 align=center>employeepayship</h2>
<table align="center">
<tr>
<td>
employee name:
</td>
<td>
<input type=text name=text>
</td>
</tr>
<tr>
<td>
employee number
</td><td><input type=text name=text2>
</td>
</tr>
<tr>
<td>
Salary</td>
<td>
<input type=text name=text3>
</td>
</tr>
<tr>
<td>pf</td>
<td>
<input type=text name=text4>
</td>
</tr>
<td>da</td>
<td>
<input type=text name=text5>
</td>
</tr>
<tr>
<td>netsalary</td>
<td>
<input type=text name=text6>
</td>
</tr>
<tr>
<td>
<input type=button value="calculation" onClick=cal()>
</td>
</tr>
</table>
</form>
</body>
</html>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.