<html>
<head>
<meta charset="UTF-8">
<title></title>
<script>
var form = document.forms.myform,
qty = form.qty,
cost = form.cost,
output = form.textbox;
window.calculate = function () {
var q = parseInt(qty.value, 10) || 0,
c = parseFloat(cost.value) || 0;
output.value = (q * c).toFixed(2);
};
</script>
</head>
<body>
<form action="caltest.php" method="post" name="myform" onkeyup="calculate()">
<label>Num of PAX :</label>
<input type="text" name="qty" />
<input type="hidden" name="cost" value="700" />
<br/>
<lable>Total Price: </lable>
<input type="text" name="textbox" />
</form>
</body>
</html>
I am doing a simple calculation.Not getting any output.
$(document).ready()