js代码:

var confirmPrice = document.getElementById("<%=TextBox_confirm.ClientID %>").value;

补充:document.getElementById("TextBox_confirm").value也可以,但在母版页下会被解释成母版页模块名+id

控件:

<asp:TextBox ID="TextBox_confirm" runat="server" CssClass="confirm_price"></asp:TextBox>

服务器控件显示在客户端,都被重新编译过

相关文章: