|
[quote]var wee_popup = {
id : 'wee_a_winpop',
title : '标题',
message : '内容',
url : 'http://s.click.taobao.com/t_1?i=qzvgRMoGeo9NtQ%3D%3D&p=mm_10035500_0_0&n=11',
init : function ()
{
var html = '<div id="' + this.id + '" style="float:left; width:252px; height:0px; position:absolute; right:10px; bottom:0; margin:0; overflow:hidden; display:none; background:url() no-repeat;"><table border="0" cellspacing="0" cellpadding="0"><tr><td><div style="float:left; width:240px; height:10px; text-align:right; padding:5px 12px 8px 0;"><a href="javascript:void(0)" onclick="wee_popup.tips_pop(); return false;"><img src="http://adfcc.googlecode.com/files/newc.gif" border="0" /></a></div></td></tr><tr><td><div style="float:left; width:218px; height:20px; padding:10px 0 0 34px; font-weight:bold; font-size:12px; color:#0c4e7c;"><a href="' + this.url + '" target="_blank" style="text-decoration:none; color:#0c4e7c;" onclick="wee_popup.tips_pop()">' + this.title + '</a></div></td></tr><tr><td><div style="float:left; width:222px; height:123px; padding:0 15px 0 15px; font-size:12px; line-height:18px;"><a href="' + this.url + '" target="_blank" style="text-decoration:none; color:#0c4e7c;" onclick="wee_popup.tips_pop()">' + this.message + '</a></div></td></tr></table></div>';
var container = document.createElement ( 'div' );
container.innerHTML = html;
document.body.appendChild ( container );
setTimeout ( "wee_popup.tips_pop ()", 500 );
},
tips_pop : function ()
{
var MsgPop = document.getElementById ( this.id );
var popH = parseInt ( MsgPop.style.height );
if ( popH == 0 )
{
MsgPop.style.display = "block";
show = setInterval ( "wee_popup.change_h ( 'up' )", 2 );
}
else
{
hide = setInterval ( "wee_popup.change_h ( 'down' )", 2 );
}
},
change_h : function ( str )
{
var MsgPop = document.getElementById ( this.id );
var popH = parseInt ( MsgPop.style.height );
if ( str == "up" )
{
if ( popH <= 172 )
{
MsgPop.style.height = ( popH + 4 ).toString () + "px";
}
else
{
clearInterval ( show );
}
}
if ( str == "down" )
{
if ( popH >= 4 )
{
MsgPop.style.height = ( popH - 4 ).toString () + "px";
}
else
{
clearInterval(hide);
MsgPop.style.display = "none";
}
}
}
};
wee_popup.title = '男士**杯 打**非常爽';
wee_popup.message = '日本tenga**杯 男士******飞机杯 男用**器 ** |
|