如何通过“for”属性更新Prototype中的
我有一个框架生成这个广播,如何更新标签“asa”文本而不是id,但用“for”属性?
<input type="radio" value="questao1" id="SimuladoQuestao1"> <label for="SimuladoQuestao1">asa</label>谢谢,Celso。
I have this radio generate by a framework, how update the "asa" text from label whithout id but with "for" attribute?
<input type="radio" value="questao1" id="SimuladoQuestao1"> <label for="SimuladoQuestao1">asa</label>Thanks, Celso.
最满意答案
Prototype有一个非常强大的选择器引擎。 这是做到这一点的一种方式:
$$('label[for="SimuladoQuestao1"]').first().update('New label')在这里看到细节
Prototype has a very strong selector engine. This is one way of doing it:
$$('label[for="SimuladoQuestao1"]').first().update('New label')See details here
更多推荐
发布评论