查看文章 |
在ASP.net中使用javascript的document.getElementById属性
2008年03月28日 星期五 14:34
在ASP.net中使用javascript的document.getElementById属性 因为JS应该由服务段生成,所以document.getElementById由用控件的ClientID来生成,使用户方法如下: 要获取DropDownList1的ID: document.getElementById("DropDownList1")要改为document.getElementById("<%=this.DropDownList1.ClientID%>")这样才能获取到正确的ID |
最近读者: