Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/444.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CrowdFlower将javascript变量添加到csv输出_Javascript_Jquery_Csv_Crowdsourcing_Crowdflower - Fatal编程技术网

CrowdFlower将javascript变量添加到csv输出

CrowdFlower将javascript变量添加到csv输出,javascript,jquery,csv,crowdsourcing,crowdflower,Javascript,Jquery,Csv,Crowdsourcing,Crowdflower,所以我创建了一个相当简单的调查,有几个网站。我想测量用户在每个页面上花费的时间。使用Java脚本测量时间本身相当简单。但是有没有办法将测量时间的变量包含在输出csv中 我试图创建一个CML文本,通过使用JQuery覆盖默认属性将值写入其中,但变量没有写入textfield 相关HTML代码: <cml:text label="Zeit:" default = "0" aggregation="all" id = "TimePage1"></cml:text> 相

所以我创建了一个相当简单的调查,有几个网站。我想测量用户在每个页面上花费的时间。使用Java脚本测量时间本身相当简单。但是有没有办法将测量时间的变量包含在输出csv中

我试图创建一个CML文本,通过使用JQuery覆盖默认属性将值写入其中,但变量没有写入textfield

相关HTML代码:

 <cml:text label="Zeit:" default = "0"  aggregation="all" id = "TimePage1"></cml:text>

相关JQuery:

$("#nextButton").click(function() {
    //determine the time    
    time2 = performance.now()
    timeDiffinSec = (time2-time1)/1000;
    timeArray[currentPage-1] = timeArray[currentPage-1] + timeDiffinSec;
    //alert( timeArray[currentPage-1]);
    //add time to the CML element here
    $("#TimePage1").attr("default", timeArray[currentPage-1]);
    //$("#TimePage1").html(" <cml:text label='Zeit:' default = '0'  aggregation='all' id = 'TimePage1'></cml:text>");
    //change page
    currentPage++;
    updatePage();        
  });  
$(“#下一个按钮”)。单击(函数(){
//确定时间
time2=performance.now()
timediffinse=(time2-time1)/1000;
timeArray[currentPage-1]=timeArray[currentPage-1]+TimeDiffInse;
//警报(时间数组[currentPage-1]);
//在此处为CML元素添加时间
$(“#TimePage1”).attr(“默认”,timeArray[currentPage-1]);
//$(“#TimePage1”).html(“”);
//换页
currentPage++;
updatePage();
});