如何更改 qualtrics 中标签的值?

How to Change value of lable in qualtrics?

我想将 qualtrics 中问题标签的值从默认值更改为其他值。 请看下面的代码:

<label for="QR~QID8" class="QuestionText BorderColor">Click to write the question text</label>
 <h2 class="noStyle">
 <label for="QR~QID8" class="QuestionText BorderColor">Click to write the question text </label>
 </h2>
 <div class="QuestionBody">
 <div class="ChoiceStructure"> 
 <input autocomplete="off" id="QR~QID8" value="" class="InputText QR-QID8 QWatchTimer" name="QR~QID8~TEXT" data-runtime-textvalue="runtime.Value" type="TEXT"> 
 </div></div> 

所以当我的用户回答上一个问题时。问题应该从 "Click to write the question text" 以前的答案改变。 例如,如果用户给出 ABC 作为答案。新的问题文本应该是 "ABC" 而不是 "Click to write the question text"

找到答案。

var label = document.querySelector('label[for="QR~QID8"]');
    label.textContent =document.getElementById('QR~QID2').value;