The Textbox is a server control and you cannot access it directly with the text box id.
The reason is any web control when processed and send back to user is a html and if you see the source, the id is changed.
Try this
var obj = document.getElementById("<%= textbox1.ClientID %>)
alert(obj.value);
Hope this helps.
cheers