jsPsych/examples/jspsych-same-different-image.html
2020-05-26 20:20:03 -05:00

34 lines
732 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-same-different-image.js"></script>
<link rel="stylesheet" href="../css/jspsych.css">
<style>
img {
width: 300px;
}
</style>
</head>
<body></body>
<script>
var trial = {
type: 'same-different-image',
stimuli: ['img/happy_face_1.jpg', 'img/sad_face_3.jpg'],
prompt: "<p>Press S if the faces had the same emotional expression. Press D if the faces had different emotional expressions.</p>",
same_key: 'S',
different_key: 'D',
answer: 'different'
}
jsPsych.init({
timeline: [trial],
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</html>