110,539
社区成员
发帖
与我相关
我的任务
分享
btn1.mouseEnter+=mouseenter;
btn2.mouseEnter+=mouseenter;
btn3.mouseEnter+=mouseenter;
void mouseenter(object sender,mouseeeventarg e)
{
MessageBox.Show(((button)sender).Text);
}
<input id = "btn1" type = "button" onmousemove = "show(this)" text = "按钮1" />
<input id = "btn2" type = "button" onmousemove = "show(this)" text = "按钮2" />
<input id = "btn3" type = "button" onmousemove = "show(this)" text = "按钮3" />
<script>
function show(o)
{
alert(o.id);
}
</script>