这是一款js基于json实现的仿360安全卫士右下角弹窗代码,网页右下角固定图片弹窗提示效果,可关闭。
<script src="js/myFun.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
window.addEventListener('load',function(){
//获取事件源
var box = document.getElementById('box');
var close = document.getElementById('close');
var top = document.getElementById('top');
var bottom = document.getElementById('bottom');
//绑定事件
close.addEventListener('click',function(){
animation(bottom,{"height":0},function(){
animation(box,{"width":0},function(){
close.style.display = 'none';
})
})
});
})
</script>