thenextbesthang
10-29-2006, 09:14 PM
<script type = "text/javascript">
function getsalestax(cost)
{
tax = "$" + (cost*.08) + ", ";
document.write(tax);
}
</script>
</head>
<body>
<script type = "text/javascript">
var cost = parseFloat(window.prompt("Enter Cost of Item here"));
var tax;
while (cost != "q")
{
getsalestax(cost);
cost = parseFloat(window.prompt("Enter Cost of Item here"));
}
</script>
function getsalestax(cost)
{
tax = "$" + (cost*.08) + ", ";
document.write(tax);
}
</script>
</head>
<body>
<script type = "text/javascript">
var cost = parseFloat(window.prompt("Enter Cost of Item here"));
var tax;
while (cost != "q")
{
getsalestax(cost);
cost = parseFloat(window.prompt("Enter Cost of Item here"));
}
</script>