You can access the textbox client id and save it in a hidden field from code behind. Then on the client you can access the textbox id from the hidden field. Here's an example:
aspx:
var hiddenfield = document.getElementById("HiddenField1");
var textbx = document.getElementById(hiddenfield.value);
alert(textbx.value);
}
Also another option would be to store the client id of the textbox editor in window object attribute (global scope variable) and then trace the textbox on the client calling the document.getElementById(id) javascript method as illustrated in the following code library submission: Retrieving grid editor value client side