|
ANOTHER question about JavaScript!!
Can anyone help? Below is my little JavaScript, my problem is I want the output to have astrix around it like so but cant remember how to do it..doh!
***********************************
The price of your ticket is
***********************************
This is my script............................................ .....................................
// to check the status of a prospective ticket purchaser
var age;
age = window.prompt('Please enter your age', '');
age = parseFloat(age);
while (age<5)
{
document.write ('You have made a mistake, please re-enter your age'+ '<BR>')
age = window.prompt('Please re-enter your age', '');
age = parseFloat(age);
}
if (age >59)
{
document.write
('The price of your ticket is a concessionary £8')
}
if (age <17)
{
document.write
('The price of your ticket is a concessionary £8')
}
else
{
document.write('The price of your ticket is £10')
}
Thanks for any input
|