Lesson 31: The Script and Its Effect
The Script
<SCRIPT LANGUAGE="javascript">
function figureItOut()
{
var dinCost = document.meal.dinner.value
var tipCost = dinCost * .15
var bigtipCost = dinCost * .25
document.meal.tip.value = tipCost
document.meal.bigtip.value = bigtipCost
}
</SCRIPT>
Back to the Index Page