可能是愚蠢的问题,但这在p5js中是否可行?function setup() { myButton.mousePressed(toggleVideo(1)); //This toggleVideo works well without argument } function toggleVideo(v) { blablabla[v].loop(); } 非常感谢! 最佳答案 用mousePressed(function() { toggleVideo(1);});