ClientID 获取服务端控件,客户端id的方法
2014-04-16 15:53
323 查看
<%@ 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>
相关文章推荐
- 获取asp.net服务器控件的客户端ID和Name的实现方法
- asp.net服务器控件解析到客户端时获取客户端控件ID的方法
- JQuery获取服务端控件ID的方法
- js获取服务器生成并返回客户端呈现给客户的控件id的方法
- 获取asp.net服务器控件的客户端ID和Name的实现方法
- ASP.Net中使用ClientID获取服务端控件ID
- 动态获取一个服务端控件的客户端ID
- JQuery获取服务端控件ID的方法
- (死亡历程)Delphi7 自带的控件 IdTCPClient,IdTCPServer 客户端发送给服务端,服务端转发给其它客户端
- vc 多个菜单 绑定一个 方法 获取对应控件id
- JS或jQuery获取ASP.NET服务器控件ID的方法
- .NET中获取服务器端控件的ID进行客户端编程
- asp.net服务端代码如何获取客户端控件的值(HTML控件)
- 浅析Page.LoadTemplate("模板")方法动态获取绑定模板后,通过FindControl获取服务端控件的方法。
- 服务端获取客户端IP的方法
- 常量,字段,构造方法 调试 ms 源代码 一个C#二维码图片识别的Demo 近期ASP.NET问题汇总及对应的解决办法 c# chart控件柱状图,改变柱子宽度 使用C#创建Windows服务 C#服务端判断客户端socket是否已断开的方法 线程 线程池 Task .NET 单元测试的利剑——模拟框架Moq
- C#.NET GridView 中如何获取脚中的控件ID并添加客户端事件
- 从外部的js文件中获取ASPX页面的服务端控件ClientID(转载自博客园)
- .NET中获取服务器端控件的ID进行客户端编程
- [转] 客户端的JavaScript脚本中获取服务器端控件的值 及ID