Home > Web Front-end > JS Tutorial > body text

JS implements moving the mouse up to display pictures or WeChat QR codes

高洛峰
Release: 2017-01-20 15:00:03
Original
1551 people have browsed it

No more nonsense, I will just post the code for you.

<html>
<head>
<script type="text/javascript">
function showImg(){
document.getElementById("wxImg").style.display=&#39;block&#39;;
}
function hideImg(){
document.getElementById("wxImg").style.display=&#39;none&#39;;
}
</script>
</head>
<body>
<a href="javascript:void(0)" onMouseOut="hideImg()" onmouseover="showImg()">测试</a>
<div id="wxImg" style="display:none;height:50px;back-ground:#f00;position:absolute;">这里是微信图片</div>
</body>
</html>
Copy after login

The above is the JS implementation introduced by the editor to display pictures or WeChat QR codes when the mouse is moved up. I hope it will be helpful to everyone. If If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank you all for your support of the PHP Chinese website!

For more JS implementation of moving the mouse up to display pictures or WeChat QR codes, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template