Basic javascript question: how to change paragraph text in realtime from an input box

If i have an input box where a new user can enter their desired username, can i have some paragraph text on the same page update to show this username, as they type?

so if the user wants the username of ‘bob’, as they type they will see that their url on the site would be http://site.com/user/bob - and this would change as they type.

i’ve seen it done on imagekind and wondered if anyone has any clues? many thanks.