在ASP.net中使用javascript的document.getElementById属性
2009-09-04 20:28
721 查看
![]() ![]() 在ASP.net中使用javascript的document.getElementById属性 因为JS应该由服务段生成,所以document.getElementById由用控件的ClientID来生成,使用户方法如下: 要获取TextBox1的ID: document.getElementById("TextBox1")要改为document.getElementById("<%=this.TextBox1.ClientID%>")这样才能获取到正确的ID |
相关文章推荐
- 【Asp.Net】document.getElementById 的属性介绍
- ASP .Net 2.0 FindControl getElementById 使用
- ASP.NET 2.0 创建母版页导致js出现“ 'document.getElementById(...)' 为空或不是对象”错误
- javascript:使用document.getElementById读取数据为空分析
- ASP.NET#使用母版时,如果要使用js中的getElementById()方法取得某个内容页的元素时要注意的问题
- asp.net中使用getElementById的注意点
- ASP.NET 2.0 创建母版页导致js出现“ 'document.getElementById(...)' 为空或不是对象”错误
- ASP.NET 2.0 创建母版页导致js出现“ 'document.getElementById(...)' 为空或不是对象”错误《转》
- 在JavaScript中使用document.getElementById()获取对象失败的原因
- ASP.NET 创建母版页导致js出现“ 'document.getElementById(...)' 为空或不是对象”错误
- JavaScript中也使用$美元符号来代替document.getElementById
- document.getElementById 在UserControl中的使用
- javascript-1.document.getElementById
- javascript getElementById 使用方法及用法
- 【JavaScript】document.getElementById方法在Firefox与IE中的区别
- 【转】document.getElementById与getElementsByName的区别(JavaScript)
- 使用母板页后javascript getelementbyid出错的解决方案
- getElementById Vs getElementsByName(Javascript)细说HTML元素的ID和Name属性的区别
- Master Pages and JavaScript document.getElementById