[英]Highcharts Renderer Button ID
Inside a callback this
refers to the clicked button. 在回调内部,
this
是指单击的按钮。 You can also set its id if you use attr()
method. 如果使用
attr()
方法,也可以设置其id。
var custombutton = charts[i].renderer.button('button', 450, 10, function() {
// not working
alert(this.element.id);
}, null, hoverState, pressedState).attr({
id: 'button-' + i
}).add();
example: http://jsfiddle.net/kh5jY/9517/ 示例: http : //jsfiddle.net/kh5jY/9517/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.