jsPsych/examples/error-messages-for-no-plugin.html
2016-12-09 21:25:56 -05:00

31 lines
634 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../jspsych.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>
img { width: 300px; }
</style>
</head>
<body>
<div id="jspsych-target"></div>
</body>
<script>
// no type parameter below.
var block_1 = {
type: 'single-stim',
stimulus: 'img/happy_face_1.jpg',
choices: [89,78], // Y or N
prompt: '<p class="center-content">Have you seen this face before? Y or N.</p>'
}
// should get error message in console about no plugin loaded
jsPsych.init({
timeline: [block_1]
});
</script>
</html>