<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication5.WebForm1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script src="jquery-2.1.0-beta3.js"></script>
<script type="text/javascript">
$(function () {
$("#btn").click(function () { alert($("#"+"<%=TextBox1.ClientID %>").val());
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input type="button" value="点击" id="btn" />
</div>
</form>
</body>
</html>