我正在尝试更改鼠标悬停在图像上的鼠标指针,这是我的脚本:
var sc = new Kinetic.Layer();
var sCircle = new Image();
var sCircleImage;
sCircle.onload = function () {
sCircleImage = new Kinetic.Image({
x: 186.183,
y: 185.89,
width: 142.114,
height: 140.22,
image: sCircle
});
sc.add(sCircleImage);
sc.draw();
};
sCircle.src = '../../Content/images/arrow_circle.png';
sCircleImage.on('mouseover', function () {
document.body.style.cursor = 'pointer';
});
sCircleImage.on('mouseout', function () {
document.body.style.cursor = 'default';
});
我收到以下错误:无法获取未定义或空引用的属性“on”。我会很感激你的建议。提前致谢。