最简单JS代码实现鼠标移入显示二维码

<script type="text/javascript">
function showImg(){
document.getElementById("wxImg").style.display='block';
}
function hideImg(){
document.getElementById("wxImg").style.display='none';
}
</script>
<li><a href="javascript:void(0)" onMouseOut="hideImg()" onmouseover="showImg()"><img src="小图片地址" /></a></li>
<div id="wxImg" style="display:none;height:50px;back-ground:#f00;position:absolute; z-index: 999;"><img src="二维码图片地址" /></div>