Files
jspsych-plugins/tests/test_jspsych-html-keyboard-response-clickable.html
2026-04-22 10:43:26 +02:00

40 lines
1.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test for jspsych-html-keyboard-response-clickable</title>
<script src="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@6.2.0/jspsych.js"></script>
<link href="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@6.2.0/css/jspsych.css" rel="stylesheet" type="text/css">
<script src="../plugins/jspsych-html-keyboard-response-clickable.js"></script>
<style>
.clickable {
font-size: 90%;
color: rgb(103,161,208);
cursor: pointer;
}
</style>
</head>
<body>
<script>
document.addEventListener('DOMContentLoaded', function(event) {
var test_trial = {
type: 'html-keyboard-response-clickable',
choices: [32],
stimulus: '<p>STIMULUS</p><p class="clickable">(Click here)</p>',
on_finish: function(){
console.log("Trial is finished.");
}
};
jsPsych.init({
timeline: [test_trial]
});
});
</script>
</body>
</html>