复制代码代码如下:
<!-开始->
<style type = "text/css">
#msg_win {posición: absoluto; derecha: 0px; visual
#msg_win .icos {posición: absoluto; superior: 2px;*top: 0px; right: 2px; z-odex: 9;}
.icos a {float: izquierda; color: #ffffff; margen: 1px; text-align: Center; font-weight: negrita; ancho: 14px; altura: 22px; line-height: 22px; relly: 1px; text-decoration: none; font-family: webdings;}
.icos a: hover {color:#ffcc00;}
#msg_title {fondo: #FA6705; Border-Bottom: 1px Solid #710B97; Border-Top: 1px Solid #FFF; Border-Left: 1px Solid #FFF; Color: #FFFFFF; Height: 25PX; Line-Height: 25px; Text-Indent: 5PX; Font-Weight: Bold;}
#msg_content {margen: 1px; margen-derecha: 0; ancho: 210px; altura: 160px; desbordamiento: oculto; Text-Align: Center}
</style>
<!-结束->
<div id = "msg_win" style = "Display: Block; arriba: 503px; Visibilidad: Visible; Opacidad: 1;">
<Div> <a id = "msg_min" href = "javascript: void 0"> _ </a> <a id = "msg_close" href = "javascript: void 0"> × </a> </div>
<div id = "msg_title"> 标题
</div>
<div id = "msg_content">
<Object ClassID = "CLSID: D27CDB6E-AE6D-11CF-96B8-444553540000"
CodeBase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
<Param name = "Movie" value = "flvplayer.swf? Vcastr_file = userlogin/video/qlg.flv & isautoPlay = 1"/>
<param name = "Quality" Value = "High"/>
<Param name = "PodisodfullScreen" value = "true" />
<incrustar src = "flvplayer.swf? vcastr_file = userLogin/video/qlg.flv & isautoPlay = 1" tentisMlScreen = "true" calidad = "alto"
pluginspage = "http://www.macromedia.com/go/getflashplayer" type = "application/x-shockwave-flash"> </incrusco>
</objeto>
</div>
</div>
<script type = "text/javaScript">
VAR Mensaje = {
set: function () {// 最小化与恢复状态切换
var set = this.minbtn.status == 1? [0, 1, 'bloque', this.char [0], '最小化']: [1, 0, 'ninguno', this.char [1], '恢复'];
this.minbtn.status = set [0];
this.win.style.borderbottomwidth = set [1];
this.content.style.display = set [2];
this.minbtn.innerhtml = set [3]
this.minbtn.title = set [4];
this.win.style.top = this.gety (). top;
},
Close: function () {// 关闭
this.win.style.display = 'None';
document.all.xhs1.stop ();
Window.onscroll = nulo;
},
setOpacity: function (x) {// 设置透明度
var v = x> = 100? '': 'Alfa (opacidad =' + x + ')';
this.win.style.visibility = x <= 0? 'oculto': 'visible'; // es decir 有绝对或相对定位内容不随父透明度变化的 有绝对或相对定位内容不随父透明度变化的 error
this.win.style.filter = V;
this.win.style.opacity = x / 100;
},
show: function () {// 渐显
ClearInterval (this.timer2);
var me = this, fx = this.fx (0, 100, 0.1), t = 0;
this.timer2 = setInterval (function () {
t = fx ();
me.setopacity (t [0]);
if (t [1] == 0) {ClearInterval (me.timer2)}
}, 6); // 10 a 6
},
FX: función (a, b, c) {// 缓冲计算
var cmath = math [(a - b)> 0? "piso": "techo"], c = c || 0.1;
Función de retorno () {return [a += cmath ((b - a) * c), a - b]}
},
gety: function () {// 计算移动坐标
var d = document, b = document.body, e = document.documentelement;
var s = Math.max (B.Scrolltop, E.Scrolltop);
var h = /backcompat/i.test(document.compatmode)? B.ClientHeight: E.ClientHeight;
var h2 = this.win.offsetheight;
Return {Foot: S + H + H2 + 2 + 'Px', Top: S + H - H2 - 2 + 'Px'}
},
Moveto: function (y) {// 移动动画
ClearInterval (this.timer);
var me = esto, a = parseint (this.win.style.top) || 0;
var fx = this.fx (a, parseint (y));
var t = 0;
this.timer = setInterval (function () {
t = fx ();
me.win.style.top = t [0] + 'px';
if (t [1] == 0) {
ClearInterval (yo.timer);
me.bind ();
}
}, 6); // 10 a 6
},
Bind: function () {// 绑定窗口滚动条与大小变化事件
var me = this, st, rt;
window.onscroll = function () {
ClearTimeOut (ST);
Cleartimeout (me.timer2);
me.setopacity (0);
st = setTimeout (function () {
me.win.style.top = me.gety (). top;
yo.show ();
}, 100); // 600 mod 100
};
window.onresize = function () {
ClearTimeOut (RT);
rt = setTimeOut (function () {me.win.style.top = me.gety (). top}, 100);
}
},
init: function () {// 创建 html
función $ (id) {return document.getElementById (id)};
this.win = $ ('msg_win');
var set = {minbtn: 'msg_min', closeBtn: 'msg_close', title: 'msg_title', content: 'msg_content'};
for (var id en set) {this [id] = $ (set [id])};
var me = esto;
this.minbtn.onclick = function () {me.set (); this.blur ()};
this.closbebtn.onclick = function () {me.close ()};
this.char = navigator.useragent.tolowercase (). indexOf ('Firefox') + 1? ['_', '::', '×']: ['0', '2', 'r']; // ff 不支持 webdings 字体
this.minbtn.innerhtml = this.char [0];
this.closbebtn.innerhtml = this.char [2];
setTimeOut (function () {// 初始化最先位置
me.win.style.display = 'bloque';
me.win.style.top = me.gety (). pie;
me.moveto (me.gety (). top);
}, 0);
devolver esto;
}
};
Mensaje.init ();
</script>