dcsimg

Assignment 48: A Possible Answer



This...

<SCRIPT LANGUAGE="javascript">

function GoIn()
{
var Password = new Array("p","z","l","j","e","q","o","b","x","z")

function getNumbers()
{
return document.userInput.u1.value
return document.userInput.u2.value
return document.userInput.u3.value
}

var input1 = document.userInput.u1.value
var input2 = document.userInput.u2.value
var input3 = document.userInput.u3.value

var pw1 = Password[input1]
var pw2 = Password[input2]
var pw3 = Password[input3]

var pw = pw1 + pw2 + pw3
if (pw == pw1+pw2+pw3)
{location.href = pw+ ".html"}
}
</SCRIPT>
Put in Your Three-Number Password to Enter: <center>
<FORM NAME="userInput">
<INPUT TYPE="text" Name ="u1" SIZE="2">
<INPUT TYPE="text" Name ="u2" SIZE="2">
<INPUT TYPE="text" Name ="u3" SIZE="2">
<INPUT TYPE="button" VALUE="Enter" onClick="GoIn()">
</FORM>
</center>

 

Gets you this

Put In Your Three-Number Password To Enter:

     The password 3, 6, 4 would mean the 4th, 7th, and 5th letters must spell out the word "joe". Look above -- it does.

 

Did You Get It?

Back to the Index Page