about us!

Click the image to enter a password protected document. Try a wrong entry first.

function password()
{

Ret = prompt('Type the word castle',"");

if(Ret=="castle")
{
   location = 'ch03_1.htm';
  }
else
{
   alert("Please try again")
}

}

The function password has empty brackets "()" which indicate that there are no parameters.

Notice: this function contains

The variable Ret is assigned a value and the If/else condition test the value to determin what happens next.

I will discuss this later.