星空网 > 软件开发 > 网页设计

使用jTopo给Html5 Canva中绘制的元素添加鼠标事件_html5教程技巧

代码如下:


var node = new JTopo.Node("Hello"); 
node.setLocation(409, 269); 
node.mousedown(function(event){ 
if(event.button == 2){ 
node.text = '按下右键'; 
}else if(event.button == 1){ 
node.text = '按下中键'; 
}else if(event.button == 0){ 
node.text = '按下左键'; 

}); 
node.mouseup(function(event){ 
if(event.button == 2){ 
node.text = '松开右键'; 
}else if(event.button == 1){ 
node.text = '松开中键'; 
}else if(event.button == 0){ 
node.text = '松开左键'; 

}); 
node.click(function(event){ 
console.log("单击"); 
}); 
node.dbclick(function(event){ 
console.log("双击"); 
}); 
node.mousedrag(function(event){ 
console.log("拖拽"); 
}); 
node.mouseover(function(event){ 
console.log("mouseover"); 
}); 
node.mousemove(function(event){ 
console.log("mousemove"); 
}); 
node.mouseout(function(event){ 
console.log("mouseout"); 
}); 



原标题:使用jTopo给Html5 Canva中绘制的元素添加鼠标事件_html5教程技巧

关键词:HTML

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

shopify:https://www.ikjzd.com/w/184
Modalku_P2P网贷平台:https://www.ikjzd.com/w/1840
首信易支付:https://www.ikjzd.com/w/1841
喜课_跨境电商培训机构:https://www.ikjzd.com/w/1842
金融科技初创公司Investree:https://www.ikjzd.com/w/1843
嘀嗒国际物流:https://www.ikjzd.com/w/1844
宜宾江安-宜宾江安县旅游景点大全:https://www.vstour.cn/a/404232.html
浏阳市里面哪里好玩的地方 浏阳市内有什么好玩的地方:https://www.vstour.cn/a/404233.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流