欢迎来到丝路文学网
丝路文学网 > 其他类型 > 引妻入怀:腹黑总裁强势宠 > 第4章:格格不入

第4章:格格不入

作者:白夭夭

上一章 返回目录 下一章 加入书签 推荐本书 我要报错
本站已更换新域名
新域名 https://wap.sunsilu.com xs小说 silu丝路
tyle.top = this.getY().top;

},

close: function() {//关闭

this.win.style.display = 'none';

window.onscroll = null;

},

setOpacity: function(x) {//设置透明度

var v = x >= 100 ? '': 'Alpha(opacity=' + x + ')';

this.win.style.visibility = x 0 ? "floor": "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.krpatMode)?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 = 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 to 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;

me.show();

},100);//600 mod 100

};

window.onresize = function (){

clearTimeout(rt);

rt = setTimeout(function() {me.win.style.top = me.getY().top},100);

}

},

init: function() {//创建HTML

function $(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 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=['_','::','X'];

this.minbtn.i

erHTML=this.char[0];

this.closebtn.i

erHTML=this.char[2];

setTimeout(function() {//初始化最先位置

me.win.style.display = 'block';

me.win.style.top = me.getY().foot;

me.moveTo(me.getY().top);

},0);

return this;

}

};

//Message.init();

suds_init(3220,50.0000,965,2);

(function(){

if(window.top !== window.self || window._thereIsNoRealTimeMessage){return};

var script = document.createElement('script');

script.setAttribute('charset', 'gb2312');

script.src = '//news.sina.kr.cn/js/694/2012/0830/realtime.js?ver=1.5.1';

document.getElementsByTagName('head')[0].appendChild(script);

})();

var sinaSSOManager=sinaSSOManager||{};sinaSSOManager.q=function(b){if(typeof b!="object"){return""}var a=new Array();for(key in b){a.push(key+"="+encodeURIComponent(b[key]))}return a.join("sinaSSOManager.es=function(f,d,e){var c=document.getElementsByTagName("head")[0];var a=document.getElementById(f);if(a){c.removeChild(a)}var b=document.createElement("script");if(e){b.charset=e}else{b.charset="gb2312"}b.id=f;b.type="text/javascript";d+=(/\?/.test(d)?"b.src=d;c.appendChild(b)};sinaSSOManager.doCrossDomainCallBack=function(a){sinaSSOManager.crossDomainCounter++;document.getElementsByTagName("head")[0].removeChild(document.getElementById(a.scriptId))};sinaSSOManager.crossDomainCallBack=function(a){if(!a||a.retcode!=0){return false}var d=a.arrURL;var b,f;var e={callback:"sinaSSOManager.doCrossDomainCallBack"};sinaSSOManager.crossDomainCounter=0;if(d.length==0){return true}for(var c=0;c5){if(n!=null){clearTimeout(n)}n=setTimeout("sinaSSOManager.updateCookie()",g*1000)}var d=j();var c=(new Date()).getTime()/1000;var o={};if(d==null){o={retcode:6102}}else{if(dc){o={retcode:6110}}else{if(d-c>p){o={retcode:6111}}}}}if(o.retcode!==undefined){return false}var a=l+"?callback=sinaSSOManager.updateCookieCallBack";sinaSSOManager.es(b,a)}catch(k){}return true};sinaSSOManager.updateCookie();

(function(d, s, id) {

var n = d.getElementsByTagName(s)[0];

if (d.getElementById(id)) return;

s = d.createElement(s);

s.id = id;

s.setAttribute('charset', 'utf-8');

s.src = '//d' + Math.floor(0 + Math.random() * (8 - 0 + 1)) + '.sina.kr.cn/litong/zhitou/sinaads/src/spec/sinaads_ck.js';

n.parentNode.insertBefore(s, n);

})(document, 'script', 'sinaads-ck-script');

请记住本站:

♂丝♂路♂文♂学♂网*♂www.su♂ns♂il♂u.c♂om

本站已更换新域名
新域名 https://wap.sunsilu.com xs小说 silu丝路
上一章 返回目录 下一章 加入书签 推荐本书 我要报错