我有一个由框架生成的 radio ,如何从没有 id 但具有“for”属性的标签更新“asa”文本?
<input type="radio" value="questao1" id="SimuladoQuestao1">
<label for="SimuladoQuestao1">asa</label>
谢谢, 塞尔索。
最佳答案
Prototype 有一个非常强大的选择器引擎。这是一种方法:
$$('label[for="SimuladoQuestao1"]').first().update('New label')
参见 details here
关于html - 如何通过 "for"属性更新 Prototype 中 <label> 的 innerHTML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6378919/