我有四個操作鏈接與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()' –