【问题标题】:How update a innerHTML of a <label> in Prototype by "for" attribute?如何通过“for”属性更新 Prototype 中 <label> 的 innerHTML?
【发布时间】:2011-09-16 18:14:55
【问题描述】:

我有这个由框架生成的收音机,如何从没有 id 但带有“for”属性的标签更新“asa”文本?

<input type="radio" value="questao1" id="SimuladoQuestao1">
        <label for="SimuladoQuestao1">asa</label>

谢谢, 塞尔索。

【问题讨论】:

    标签: html radio-button label prototypejs innerhtml


    【解决方案1】:

    Prototype 有一个非常强大的选择器引擎。这是一种方法:

    $$('label[for="SimuladoQuestao1"]').first().update('New label')
    

    details here

    【讨论】:

      猜你喜欢
      • 2012-10-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-24
      • 2020-03-25
      • 2010-10-11
      • 2019-10-09
      相关资源
      最近更新 更多