gpt4 book ai didi

javascript - 在 Qualtrics 中检索 react 时间

转载 作者:行者123 更新时间:2023-12-03 03:08:54 31 4
gpt4 key购买 nike

我编写了以下脚本来测量受访者对每个问题的 react 时间。我的问题是如何检索 react 时间?

Qualtrics.SurveyEngine.addOnload(function(){

var starttime = new Date().getTime();

var that = this;

this.hideNextButton();

this.questionclick = function(event,element){

if (element.type == 'radio') {
var endtime = new Date().getTime();
var reactiontime = endtime - starttime;
document.getElementById("QR~"+this.questionID).value = document.getElementById("QR~"+this.questionID).value + "X" + reactiontime + ",";
}
that.clickNextButton();
}

});

最佳答案

您可以节省嵌入数据变量的 react 时间。将 react 时间定义为问题 block 之前调查流程中的嵌入数据变量。然后:

Qualtrics.SurveyEngine.addOnReady(function(){
var starttime = new Date().getTime();
$('NextButton').hide();

this.questionclick = function(event,element){
if (element.type == 'radio') {
var endtime = new Date().getTime();
var reactiontime = endtime - starttime;
Qualtrics.SurveyEngine.setEmbeddedData('reactiontime', reactiontime);
$('NextButton').click();
}
}

});

关于javascript - 在 Qualtrics 中检索 react 时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47029443/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com