我有四个操作链接与employeeid.when用户单击操作链接它显示员工的详细信息。 现在我想在鼠标悬停在操作链接上时显示员工图像。 任何人都可以告诉如何在asp.net mvc 2.0中实现这一点。在asp.net mvc 2.0中mouseover时显示图像
<script type="text/javascript">
$(document).ready(function() {
$('#employeeid').hover(function(){
var id=$('#employeeid').val();
alert(id);
$('#images').attr('src',$(this).attr('id'));
//$("#images").attr("src", "/Home/ShowEmployeeImage/" + id);
$('#images').show();
},
function(){
$('#images').hide();
});
})
});
</script>
在此先感谢。
您有一个额外的'});'到底,删除那个 –
@PedroEstrada真的吗?我不知道,新标准是什么? –
'.mouseenter()'和'.mouseleave()' –