gpt4 book ai didi

javascript - 如何因 Qualtrics 不活动而自动前进

转载 作者:行者123 更新时间:2023-12-02 15:31:57 25 4
gpt4 key购买 nike

我希望在 Qualtrics 调查中的参与者处于非事件状态 10 秒后自动将其推进到下一个问题(在下一页上)。我的不活动代码工作正常(见下文,来自 Kirupa ),但我不知道如何强制调查继续进行。有什么想法吗?

代码:

Qualtrics.SurveyEngine.addOnload(function()
{
/*Place Your Javascript Below This Line*/

var timeoutID;

function setup() {
this.addEventListener("mousemove", resetTimer, false);
this.addEventListener("mousedown", resetTimer, false);
this.addEventListener("keypress", resetTimer, false);
this.addEventListener("DOMMouseScroll", resetTimer, false);
this.addEventListener("mousewheel", resetTimer, false);
this.addEventListener("touchmove", resetTimer, false);
this.addEventListener("MSPointerMove", resetTimer, false);

startTimer();
}

setup();

function startTimer() {
// wait 10 seconds before calling goInactive
timeoutID = window.setTimeout(goInactive, 10000);
}


function resetTimer(e) {
window.clearTimeout(timeoutID);

goActive();
}
function goInactive() {
// Here is where the auto-advance code needs to go

}

function goActive() {

startTimer();
}


});

--谢谢!

最佳答案

将此行添加到 goInactive 函数中:

$('NextButton').click();

关于javascript - 如何因 Qualtrics 不活动而自动前进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33242559/

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