mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
26 lines
552 B
HTML
26 lines
552 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>
|
|
<p>The URL variable should be logged to the console</p>
|
|
</body>
|
|
<script>
|
|
|
|
if(typeof jsPsych.data.getURLVariable('v1') == 'undefined'){
|
|
window.location = window.location + '?v1=abc&v2=def';
|
|
}
|
|
|
|
console.log(JSON.stringify(jsPsych.data.urlVariables()));
|
|
|
|
console.log(jsPsych.data.getURLVariable('v1'));
|
|
|
|
</script>
|
|
</html>
|