<input id="idBoxOpen2" value=" 右下角弹窗效果 " type="button" />
<dl id="idBox2" class="lightbox">
<dt><strong>右下角消息框</strong>
<dd><input id="idBoxClose2" value=" 下滚渐隐 " type="button" /> </dd></dl>
<script>
(function(){
//右下角消息框
var timer, target, current,
xx = new AlertBox( "idBox2", { fixed: true,
onShow: function(){
clearTimeout(timer); this.box.style.bottom = this.box.style.right = 0;
},
onClose: function(){ clearTimeout(timer); }
});
function hide(){
xx.box.style.bottom = --current + "px";
if( current <= target ){
xx.close();
} else {
timer = setTimeout( hide, 10 );
}
}
$$("idBoxClose2").onclick = function(){
target = -xx.box.offsetHeight; current = 0; hide();
}
$$("idBoxOpen2").onclick = function(){ xx.show(); }
})()
</script>
<dl id="idBox2" class="lightbox">
<dt><strong>右下角消息框</strong>
<dd><input id="idBoxClose2" value=" 下滚渐隐 " type="button" /> </dd></dl>
<script>
(function(){
//右下角消息框
var timer, target, current,
xx = new AlertBox( "idBox2", { fixed: true,
onShow: function(){
clearTimeout(timer); this.box.style.bottom = this.box.style.right = 0;
},
onClose: function(){ clearTimeout(timer); }
});
function hide(){
xx.box.style.bottom = --current + "px";
if( current <= target ){
xx.close();
} else {
timer = setTimeout( hide, 10 );
}
}
$$("idBoxClose2").onclick = function(){
target = -xx.box.offsetHeight; current = 0; hide();
}
$$("idBoxOpen2").onclick = function(){ xx.show(); }
})()
</script>