Check out this Jfiddle http://jsfiddle.net/TyJy4/9/
There is an array of users here. If the username is correct, you can go to the password field. The code works fine except when I enter the first entry (of the user) in the username for the first time.
Conditions when recording works user
user
user2
readonly, true. , ( ):
for (var j=0; j<names.length; j++){ if(names[j].localeCompare(x)==0){ z.removeAttribute("readonly", 0); return true; } }
:
if(names.indexOf(x) != -1){ z.removeAttribute("readonly", 0); return true; }
indexdOf(), , , ++, for.
indexdOf()
for