📜  Raphael JS 存储任意数据 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:32.035000             🧑  作者: Mango

代码示例1
var circle = r.circle(25,50,10).attr({fill:'#b71e16', stroke:'#71140f'});
// set it
circle.data('custom-attribute', 'value');

// get it
data = circle.data('custom-attribute');
alert(data);