mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
46 lines
961 B
HTML
46 lines
961 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script src="../jspsych.js"></script>
|
|
<script src="../plugins/jspsych-fullscreen.js"></script>
|
|
<script src="../plugins/jspsych-image-keyboard-response.js"></script>
|
|
<script src="../plugins/jspsych-preload.js"></script>
|
|
<link rel="stylesheet" href="../css/jspsych.css">
|
|
</head>
|
|
<body></body>
|
|
<script>
|
|
|
|
var fullscreen_trial = {
|
|
type: 'fullscreen',
|
|
fullscreen_mode: true
|
|
}
|
|
|
|
var preload = {
|
|
type: 'preload',
|
|
auto_preload: true
|
|
}
|
|
|
|
var trial_1 = {
|
|
type: 'image-keyboard-response',
|
|
stimulus: 'img/happy_face_1.jpg',
|
|
choices: ['y','n'],
|
|
prompt: '<p>Have you seen this face before? Press "y" or "n".</p>'
|
|
}
|
|
|
|
var fullscreen_trial_exit = {
|
|
type: 'fullscreen',
|
|
fullscreen_mode: false
|
|
}
|
|
|
|
jsPsych.init({
|
|
timeline: [ fullscreen_trial, preload, trial_1, fullscreen_trial_exit ],
|
|
on_finish: function() {
|
|
jsPsych.data.displayData();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</html>
|