mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
35 lines
859 B
HTML
35 lines
859 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
|
|
<script src="../jspsych.js"></script>
|
|
<script src="../plugins/jspsych-survey-text.js"></script>
|
|
<link rel="stylesheet" href="../css/jspsych.css">
|
|
</head>
|
|
<body></body>
|
|
<script>
|
|
|
|
var survey_page1 = {
|
|
type: 'survey-text',
|
|
questions: [
|
|
{prompt: 'How old are you?', columns: 3, required: true, name: 'Age'},
|
|
{prompt: 'Where were you born?', placeholder: 'City, State/Province, Country', columns: 50, name: 'BirthLocation'}
|
|
],
|
|
randomize_question_order: true
|
|
};
|
|
|
|
var survey_page2 = {
|
|
type: 'survey-text',
|
|
questions: [
|
|
{prompt: 'Tell me about your day', placeholder: 'How did it start?', rows:10, columns: 50}
|
|
]
|
|
}
|
|
|
|
jsPsych.init({
|
|
timeline: [survey_page1, survey_page2],
|
|
on_finish: function() { jsPsych.data.displayData(); }
|
|
});
|
|
|
|
</script>
|
|
</html>
|