复制代码代码如下::
<!-开始->
<style type = "text/css">
#msg_win {Position: absolut; rechts: 0px; Anzeige: Keine; Überlauf: versteckt; Z-Index: 99; Rand: 1px Solid #C00; Hintergrund: #f9effc; Breite: 210px; Schriftgröße: 12px; Margin: 0px;}
#msg_win .icos {Position: absolut; ober: 2px;*top: 0px; rechts: 2px; z-Index: 9;}
.icos a {float: links; Farbe: #ffffff; Margin: 1px; Text-Align: Mitte; Schriftgewicht: BOLD; Breite: 14px; Höhe: 22px; Linienhöhe: 22px; Polster: 1px; Textdekoration: Keine; Schriftfamilie: Webdings;};}
.ICOS A: Hover {Farbe:#ffcc00;}
#msg_title {Hintergrund: #fa6705; Border-Bottom: 1PX Solid #710b97; Border-Top: 1PX Solid #fff; Border-Links: 1PX Solid #fff; Farbe: #ffffff; Höhe: 25px; Line-Height: 25px; Text-Indent: 5px; font-weight: fett:};
#msg_content {margin: 1px; margin-right: 0; width: 210px; Höhe: 160px; Überlauf: versteckt; Text-Align: Mitte}
</style>
<!-结束->
<div id = "msg_win" style = "display: block; top: 503px; Sichtbarkeit: sichtbar; Opazität: 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-4445535400"
Codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
<param name = "move" value = "flvPlayer.swf? vcastr_file = userLogin/Video/qlg.flv & isautoplay = 1"/>
<param name = "Qualität" value = "High"/>
<param name = "degdleFullscreen" value = "true" />
<einbett src = "flvPlayer.swf? vcastr_file = userLogin/Video/qlg.flv & isAutoplay = 1" DELUFFULLSCREEN = "TRUE" quality = "High"
PluginSpage = "http://www.macromedia.com/go/getflashplayer" type = "application/x-Shockwave-flash"> </embed>
</Object>
</div>
</div>
<script type = "text/javaScript">
var message = {
set: function () {// 最小化与恢复状态切换
var set = this.minbtn.status == 1? [0, 1, 'Block', this.char [0], '最小化']: [1, 0, 'None', 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;
},
schließen: function () {// 关闭
this.win.style.display = 'none';
document.all.xhs1.stop ();
Fenster.Onscroll = null;
},
Setopazität: Funktion (x) {// 设置透明度
var v = x> = 100? '': 'Alpha (opacity =' + x + ')';
this.win.style.visibility = x <= 0? 'versteckt': 'sichtbar'; // dh 有绝对或相对定位内容不随父透明度变化的 Fehler
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 bis 6
},
FX: Funktion (a, b, c) {// 缓冲计算
var cmath = math [(a - b)> 0? "Boden": "Ceil"], C = C || 0,1;
return function () {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.offseteight;
Rückgabe {Fuß: S + H + H2 + 2 + 'PX', oben: S + H - H2 - 2 + 'PX'}
},
MoveTo: Funktion (y) {// 移动动画
ClearInterval (this.timer);
var me = this, 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 (me.timer);
me.bind ();
}
}, 6); // 10 bis 6
},
bind: function () {// 绑定窗口滚动条与大小变化事件
var me = this, st, rt;
window.onscroll = function () {
Clearimeout (ST);
Clearimeout (me.timer2);
me.setopacity (0);
st = setTimeout (function () {
me.win.style.top = me.gety (). top;
me.show ();
}, 100); // 600 Mod 100
};
window.onResize = function () {
Clearimeout (RT);
rt = setTimeout (function () {me.win.style.top = me.gety (). top}, 100);
}
},
init: function () {// 创建 html
Funktion $ (id) {return document.getElementById (id)};
this.win = $ ('msg_win');
var set = {minbtn: 'msg_min', closeBtn: 'msg_close', Titel: 'msg_title', Inhalt: 'msg_content'};
für (var id in set) {this [id] = $ (set [id])};
var me = this;
this.minbtn.onclick = function () {me.set (); this.blur ()};
this.closeBtn.onclick = function () {me.close ()};
this.char = navigator.useragent.tolowerCase (). INDEXOF ('Firefox') + 1? ['_', '::', '×']: ['0', '2', 'R']; // ff 不支持 Webdings 字体
this.minbtn.innerhtml = this.char [0];
this.closeBtn.innerhtml = this.char [2];
setTimeout (function () {// 初始化最先位置
me.win.style.display = 'block';
me.win.style.top = me.gety (). Fuß;
me.moveto (me.gety (). top);
}, 0);
gib dies zurück;
}
};
Message.init ();
</script>