You could use ajax but I dont see why you dont just use javascript on it's own if you only want something to appear somewhere on the screen when you type in a textbox.
You would use AJAX when you need the server to do something with the data that you type and then display it.
I use jQuery now as it makes it easy to select and manipulate the dom. There are quite a few good examples on www.jquery.com