据我所知,只有一种方法可以扩展Raphael.st... Raphael.st.setID = function(id){ this.id = id; } var yourset = paper.set(); yourset.setID(id); //give the id you want then try -> yourset.id; 我希望这对你有用。以下是关于IT技术的内容: