标签:
如:
<asp:TextBox ID="txtSubject" runat="server">aa</asp:TextBox>
第一次用服务器控件,原来他就是和input标签一样 !
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <script type="text/javascript" src="script/Jquery.js"></script> <script type="text/javascript"> $(function () { var str=""; var t1=document.getElementById("<%= TextBox1.ClientID").value; var t2=$("#<%= TextBox1.ClientID%>").val(); alert(t1); alert(t2); }) </script> </head> <body> <form id="form1" runat="server"> <asp:TextBox ID="TextBox1" runat="server">sdf</asp:TextBox> <asp:TextBox ID="TextBox2" runat="server">sdf</asp:TextBox> <asp:TextBox ID="TextBox3" runat="server">ee</asp:TextBox> <asp:TextBox ID="TextBox4" runat="server">ee</asp:TextBox> <asp:TextBox ID="TextBox5" runat="server">ee</asp:TextBox> <input type="button" name="button" value="button"/> </form> </body> </html>
用JQuery怎么去一次性获取 aspTextBox 文本框的值
标签:
原文地址:http://www.cnblogs.com/yuhuameng/p/4958381.html