If you want the server to do something after the textbox loses focus you can add AutoPostback="True" and, if you don't want the postback to reload the whole page, use an UpdatePanel:
The function TextBox1_TextChanged can then do something with the text (serverside).