-
Notifications
You must be signed in to change notification settings - Fork 0
/
survey.html
87 lines (83 loc) · 2.33 KB
/
survey.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html>
<head>
<script src="jspsych.js"></script>
<script src="jspsych-survey-text.js"></script>
<script src="jspsych-survey-multi-choice.js"></script>
<script src="jspsych-survey-multi-select.js" ></script>
<script src="jspsych-instructions.js"></script>
<link rel='stylesheet' type='text/css' href='jspsych_myStyle.css'>
</head>
<body>
</body>
<script>
var timeline = [];
var instructions = {
type: 'instructions',
pages: ['<h3>Welcome to the experiment.</h3>'+
'<p>Here is the consent form</p>'+
'<p>Click here to download the consent form<p>'+
'<a href="consent.pdf" target="_black">'+
'<button type="submit">Download consent form</button>'+
'</a>'
],
show_clickable_nav: true,
show_page_number: true
}
var age = {
type: 'survey-text',
questions: [
{
prompt: 'Please input your MTurk worker ID:',
columns: 10,
required: true,
name: 'WorkerID'
},
{
prompt: 'How old are you?',
columns: 3,
required: true,
name: 'Age'
}
],
};
var questions = {
type: 'survey-multi-choice',
questions: [
{
prompt: "What is your gender?",
options: ["Female", "Male", "Other", "Prefer not to tell"],
required: true,
horizontal: false,
},
{
prompt: "Which hand you use to control the mouse/touch pad?",
options: ["Left", "Right"],
required: true,
horizontal: false
}
],
};
var agree = {
type: 'survey-multi-select',
questions: [
{
prompt: " ",
options: ["I read the insturctions and agree to start the experiment."],
horizontal: true,
required: true,
name: 'agree'
}
]
};
// var Survey = [instructions,age,questions,agree];
timeline.push(instructions);
timeline.push(age);
timeline.push(questions);
timeline.push(agree);
jsPsych.init({
timeline: timeline,
on_finish: function() { jsPsych.data.displayData(); }
});
</script>
</html>