Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

psychbruce/jspsych

Repository files navigation

jsPsych中文示例程序(Experiment Demos)

💻 Psychological experiment demos developed with "jsPsych", a JavaScript library created by Joshua R. de Leeuw for running online/offline behavioral experiments (de Leeuw, 2015). All experiments in this GitHub repository are designed for Chinese participants and so displayed in Chinese.

注:jsPsych是由Joshua R. de Leeuw开发的JavaScript脚本库,用于编写在线/本地心理学实验程序,第1版发布于2012年7月(v1.0),最新版发布于2019年7月(v6.1.0)。本代码库是基于jsPsych开发的心理学在线实验中文示例程序。

  • 复制、修改、使用、分享本代码库,必须遵守「创作共用许可协议 CC BY-NC-SA」(原作者署名-非商业用途使用-相同方式共享)

例如:
某某某的程序使用了JavaScript脚本库"jsPsych"(https://www.jspsych.org; de Leeuw, 2015),并参考/借鉴了GitHub代码库"jsPsych中文示例程序"(https://github.com/psychbruce/jspsych; 包寒吴霜, 2020)。
Example:
XXX's program was developed with the JavaScript library "jsPsych" (https://www.jspsych.org; de Leeuw, 2015) and partly adapted from the GitHub repository "jsPsych Experiment Demos in Chinese" (https://github.com/psychbruce/jspsych; Bao, 2020).

作者

包寒吴霜 | Bao H.-W.-S.

中国科学院心理研究所 · 人格与社会心理研究中心

E-mail: baohws@foxmail.com

Website: psychbruce.github.io

ResearchGate | GitHub | 知乎

示例程序列表

💡 运行实验程序,请使用主流浏览器(Chrome, Edge, Firefox, Opera, Safari等),不要使用Internet Explorer(IE)

  • Experiment Demo(在线体验 / 源代码)——首发于2020年6月25日,最近更新于2020年7月30日
    • 学习难度:入门级
    • 该示例程序包括一个完整的例子:(1)实验基本设定,如字体、背景颜色、禁止右键、禁止选中文字等;(2)人口学变量采集,如收集被试年龄并把填写内容限制为两位数、范围限制在15~99岁等;(3)问卷调查与量表,如"Rosenberg自尊量表"等;(4)按键反应实验,如测量内隐态度的"外在情感性西蒙任务"(Extrinsic Affective Simon Task, EAST)等;(5)结果反馈,如量表平均分等;(6)自定义JavaScript函数,如倒计时、滑动条刻度实时反馈、计算带有反向计分题的量表平均分等
  • IAT Demo(在线体验 / 源代码)——首发于2020年7月27日,最近更新于2020年7月30日
    • 学习难度:正常级
    • 该示例程序包括一个精心设计的"内隐联系测验"(Implicit Association Test, IAT)范式模板,也包括对IAT结果"D分数"的标准化计算和反馈(Greenwald, Nosek, & Banaji, 2003)
    • IAT更准确的中文翻译应为"内隐联系测验",而非"内隐联想测验",详见这篇文献

中文教程

* 更多内容,请关注知乎专栏「只求甚解

代码下载

✔ 所有代码均可从这里下载:源代码<最新> / 干净版<非最新>

⚠ 注意:复制、修改、使用、分享本代码库,请务必规范引用!

  1. Bao, H.-W.-S. (2020). jsPsych experiment demos in Chinese. https://github.com/psychbruce/jspsych
  2. de Leeuw, J. R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a web browser. Behavior Research Methods, 47(1), 1–12. https:/doi.org/10.3758/s13428-014-0458-y

* 为了更高的编程效率和更好的编程体验,强烈建议使用「VS Code」作为代码编辑器,并安装以下插件(从VS Code中的"Extensions"安装):

  • JS-CSS-HTML Formatter
  • HTML CSS Support
  • HTML Snippets
  • JavaScript (ES6) code snippets
  • ESLint
  • Bracket Pair Colorizer 2
  • Color Highlight
  • Edit csv
  • Excel Viewer
  • vscode-pdf

参考资料

  1. https://www.jspsych.org
  2. https://github.com/jspsych
  3. https://github.com/jspsych/jsPsych/discussions
  4. https://implicit.harvard.edu/implicit/china
  5. http://www.cpsylab.com

About

💻 Psychological experiment demos developed with "jsPsych".

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /