If you want textbox's value in server side then you can use it like this :
<div id="divBox" runat="server">
</div>
Now in the script tag append the text box as input element.
$("#divBox").append("<input type='text' id='txtDetails'/>");
on the server side get the textbox by this way:
TextBox txt = (TextBox)divBox.FindControl("txtDetails");
Thanks. :)