jsPsych/examples/jspsych-survey-html-form.html

37 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.2.1/material.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-survey-html-form.js"></script>
<script src="../plugins/jspsych-html-keyboard-response.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></script>
<head>
<title></title>
</head>
<body>
</body>
<script type="text/javascript">
var text_trial = {
type: 'html-keyboard-response',
stimulus: 'Press any key to view form.'
}
var form_trial = {
type: 'survey-html-form',
preamble: '<p> How are you feeling <b>right now?</b> </p>',
html: '<p> I am feeling <input name="first" type="text" />, <input name="second" type="text" />, and <input name="third" type="text" />.</p>'
}
jsPsych.init({
timeline: [text_trial, form_trial],
on_finish: function(){ jsPsych.data.displayData(); }
});
</script>
</html>