Doubt

Doubt

hi to all.
       
        I have one doubt...I am using javascript
        I have one login form...having username and password fields.
        At first if i go inside with the username:sample..
        Next time if i enter the letter 's' in the text field it should show the lastly entered all s user name ..
        How to work out this..


        Any one clarify my doubt..

Regards,
Yuvaraj..