作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我希望在 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/
我是一名优秀的程序员,十分优秀!