日期:2014-05-18 浏览次数:20446 次
$("input[type='text']").val("");
------解决方案--------------------
<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=""; $("input[type=button]").click(function () { $("input[type=text]").each(function (i) { str += $(this).val(); }) alert(str); }) }) </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>