2014-06-27 31 views

回答

1

我想你想在div中顯示該圖像。我已經在小提琴中解決了它。 這裏是JsFiddle

HTML代碼

<table> 
    <tr> 
     <td><img src="http://www.mentoringminds.com/images/LinkedInIcon.png" alt="" /></td> 
    </tr> 
    <tr> 
     <td><img src="https://cdn4.iconfinder.com/data/icons/pictype-free-vector-icons/16/view-256.png" alt="" /></td> 
    </tr> 
</table> 

<div id="displayDiv"> 
    <img src="" alt=""/> 
</div> 

JS代碼

$("td img").mouseover(function(){ 
    $("#displayDiv img").attr("src",$(this).attr("src")); 
}); 

合,它可以幫助你。祝你今天愉快。 :)

+0

僅供參考,我已將用戶圖像存儲在JSON文件中。 – arjun

+0

謝謝。現在它工作正常。 – arjun

+0

請注意並標記答案,如果它阻止了你。謝謝 :) –

相關問題