<html>
<head>
<script>
function calculate(){
var a = parseFloat(frmMain.name.value);
var b = parseFloat(frmMain.Salary.value);
var c = parseFloat(frmMain.taxrate.value);
}
</script>
</head>
<body>
<form name="frmMain">
Name <input type ="text" id="name" /><br />
Salary <input type ="text" id="Salary" /><br />
tax rate <input type ="text" id="taxrate" /><br />
<input type="button" value="calculate" onclick="calculate()" />
<input type="reset" value="Clear" /><br />
Sammary<textarea cols="20" rows="5" ></textarea>
</form>
</body>
</html>
i try to make it like this but i dont know how to get the salary and the name and taxrate put it in the comment or notes place may any body help ?
the program should get the name and taxrate and salary and print it inside the textarea using javascript when i click on calculate ? i dont have an idea how to do this
You can use something like this
DEMO