mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
34 lines
736 B
HTML
34 lines
736 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>
|