【问题标题】:How to get the id of telerik element in the javascript?如何在javascript中获取telerik元素的id?
【发布时间】:2015-11-03 12:53:51
【问题描述】:

如何在我的 javascript 中访问 Telerik 元素 ID。我尝试使用
$find("<%=radcontrol.ClientID%>"). 但这对我不起作用。

【问题讨论】:

  • 请编辑您的帖子以包含您编写的代码,通常不可能在没有看到您的代码的情况下回答问题。如果您能详细说明尝试$find("<%=radcontrol.ClientID%>") 时会发生什么,这也会有所帮助。
  • 什么都没有发生..代码没有被执行
  • code is not getting executed ...这就是为什么您需要充实您的问题...上下文就是一切
  • 我的意思是说那行代码不起作用。

标签: javascript asp.net telerik


【解决方案1】:

你可以试试这样的,

var radControl = $telerik.$("[id$='RadEditor1']").attr("id");
radControl = "#" + radControl;// here you 'll get the id telerik of element
$telerik.$(radControl).hide(); //like this you can access it

$= 在选中的 jquery 中表示元素的 ID 必须提供的字符串结尾。在这种情况下"RadEditor1"

【讨论】:

    猜你喜欢
    • 2021-08-18
    • 2014-07-29
    • 1970-01-01
    • 2020-01-27
    • 1970-01-01
    • 2011-12-11
    • 2017-08-24
    • 1970-01-01
    • 2014-01-19
    相关资源
    最近更新 更多