广告位 后台主题配置管理 |
广告位 后台主题配置管理 |
今天给各位分享zblog网页特效的知识,其中也会对zblog广告插件进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
这个人在搜狐博客比较出名,经常贴一些博客特效技巧,希望对你有帮助。
常用博客网页特效代码
2005年 01月10日
博客介绍特效、状态栏特效、收藏夹特效、首页特效、如何加入背景音乐、加入百度、google搜索栏............
常用特效全包括。
说明:把下面的特效代码粘贴到博客介绍栏既可。但状态栏特效同时只能用一种。
特效一 博客介绍栏文字滚动
可是设置为向上、向下、向左、向右。可以设置高度,滚动速度。
MARQUEE scrollAmount=1 direction=up
height=120你的文字介绍/MARQUEE
特效二 状态栏滚动文字介绍
自左向右,循环滚动。
script
!--
function Helpor_net(seed)
{ var m1 = "你要显示的文字,如:欢迎来到晓寒工作室" ;
var m2 = "" ;
var msg=m1+m2;
var out = " ";
var c = 1;
var speed = 120;
if (seed 100)
{ seed-=2;
var cmd="Helpor_net(" + seed + ")";
timerTwo=window.setTimeout(cmd,speed);}
else if (seed = 100 seed 0)
{ for (c=0 ; c seed ; c++)
{ out+=" ";}
out+=msg; seed-=2;
var cmd="Helpor_net(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,speed); }
else if (seed = 0)
{ if (-seed msg.length)
{
out+=msg.substring(-seed,msg.length);
seed-=2;
var cmd="Helpor_net(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,speed);}
else { window.status=" ";
timerTwo=window.setTimeout("Helpor_net(100)",speed);
}
}
}
Helpor_net(100);
--
/script
特效三 状态栏文字打字机效果特效
script language="JavaScript"
var msg = "你要显示的文字,如:欢迎来到晓寒工作室,请多提意见。谢谢! " ;
var interval = 120
var spacelen = 120;
var space10=" ";
var seq=0;
function Helpor_net() {
len = msg.length;
window.status = msg.substring(0, seq+1);
seq++;
if ( seq = len ) {
seq = 0;
window.status = '';
window.setTimeout("Helpor_net();", interval );
}
else
window.setTimeout("Helpor_net();", interval );
}
Helpor_net();
/script
特效四 点击即可把你的网站添加到浏览器的收藏菜单下
span style="CURSOR: hand"
onClick="window.external.addFavorite('你的域名','你的网站名')"
title="你的网站名"收藏本站/span
特效五 点击即可把你的网站设置为浏览器的起始页
span onclick="var
strhref="/blog/window.location.href";this.style.behavior='url(#default#homepage)';this.setHomePage('你的域名');"
style="CURSOR: hand"设为首页/span
特效六 浏览器的状态栏里出现一个字接一个字往左跑的欢迎语!
script language="JavaScript"
!--
function statusMessageObject(p,d) {
this.msg = MESSAGE
this.out = " "
this.pos = POSITION
this.delay = DELAY
this.i = 0
this.reset = clearMessage
}
function clearMessage() {
this.pos = POSITION
}
var POSITION = 100
var DELAY = 5
var MESSAGE = "你要显示的文字,如:欢迎来到晓寒工作室 "
var scroll = new statusMessageObject()
function scroller() {
for (scroll.i = 0; scroll.i scroll.pos; scroll.i++) {
scroll.out += " "
}
if (scroll.pos = 0)
scroll.out += scroll.msg
else scroll.out =
scroll.msg.substring(-scroll.pos,scroll.msg.length)
window.status = scroll.out
scroll.out = " "
scroll.pos--
if (scroll.pos -(scroll.msg.length)) {
scroll.reset()
}
setTimeout ('scroller()',scroll.delay)
}
function snapIn(jumpSpaces,position) {
var msg = scroll.msg
var out = ""
for (var i=0; iposition; i++)
{out += msg.charAt(i)}
for (i=1;ijumpSpaces;i++)
{out += " "}
out += msg.charAt(position)
window.status = out
if (jumpSpaces = 1) {
position++
if (msg.charAt(position) == ' ')
{position++ }
jumpSpaces = 100-position
} else if (jumpSpaces 3)
{jumpSpaces *= .75}
else
{jumpSpaces--}
if (position != msg.length) {
var cmd = "snapIn(" + jumpSpaces + "," + position + ")";
scrollID = window.setTimeout(cmd,scroll.delay);
} else {
window.status=""
jumpSpaces=0
position=0
cmd = "snapIn(" + jumpSpaces + "," + position + ")";
scrollID = window.setTimeout(cmd,scroll.delay);
return false
}
return true
}
snapIn(100,0);
// --
/script
特效七 鼠标一碰就弹出 设为首页 对话框
a href="#"
onmouseover="this.style.behavior='url(#default#homepage)';this.setHomePage('你的域名');return(false);"
style="behavior: url(#default#homepage)"设为主页/a/td
特效八 鼠标一碰就弹出收藏本站对话框
a href="#"
onmouseover="javascript:window.external.AddFavorite('你的域名',
'你的网站名')" target="_self"收藏本站/a
特效九 加入背景音乐
EMBED src="完整的音乐地址" autostart="true" loop="5" width="0"
height="0"
特效十 google搜索栏
!-- Search Google --
center
FORM method=GET action=""
TABLE bgcolor="#FFFFFF"trtd
A HREF=""
IMG SRC=""
border="0" ALT="Google" align="absmiddle"/A
INPUT TYPE=text name=q size=23maxlength=255 value=""
INPUT TYPE=hidden name=hl value=zh-CN
INPUT TYPE=hidden name=ie value=GB2312
INPUT TYPE=submit name=btnG value="Google搜索"
/td/tr/TABLE
/FORM
/center
!-- Search Google --
特效十一 百度搜索栏
iframe id="baiduframe" border="0" vspace="0" hspace="0"
marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no"
width="200" height="30"
src=";cv=1cid=31577csid=102rkcs=2bgcr=EDEDEBftcr=FF0000rk=1bd=1bdas=0"
/iframe
特效十二 显示ip及地址
SCRIPT src=''/SCRIPT
参考资料:未完,不过差不多了,举一反三。
由于没有独立或团队开发比较正规网站的经验,我在这次的《电视节目教材编导与制作》网站的开发中可以说是“摸着石头过河”,很多东西都是边学边做,在实际的制作中才发现原先制定的计划的不合理,不得不对计划进行修改。当然在这次网站的制作中我也学到了很多东西。
赖老师要求我们做一个集合了论坛、博客的网站。我们最终确定了制作一个关于电视编导与制作的网站。论坛方面依据以前学习的知识,我估计自己是有可能做出来的,当时我对博客程序全无认识,自己估计只能使用网上现成的程序进行制作。对于网站的最主要部分,课程网站部分,我们考虑是把它做成动网还是静网。动态网站最主要的部分是数据库的设计,当时我根本没有自己设计过网站的数据库,我没信心说可以一下子设计出一个合格的数据库,其次设计数据库后还要做文章的发布页,显示页等各部分,这些做出来要花很多的时间,我觉得这样会影响到整体的进度,最终决定把这部分做成静网。
后来跟同学聊天才知道有文章添加系统。这些担只要用文章添加系统就可以很轻松地解决。而决定做成静网使得可维护性很差,还附带来了很多的问题。
在确定网站的模式和分配完各人的工作后,我们就开始网站的制作。版面是组长负责的。他用Photoshp做出页面后我就开始用DIV+CSS制作页面,之后让其它成员按照网站的内容进行添加。
这里我又犯了一个错误,我们网站要求要外接样式表,这样网站的修改就比较简单,只要修改样式表就可以达到修改所有页面的效果。一开始我图方便在做模板时把CSS运用在当前文件,以为完成后再导出来也是一样的,没相到导出来后布局却被破坏了,最终不得不再从新布局,浪费了很多时间。
中期检查时赖老师对我们使用框架提出异议,认为滚动条不利于美观,要求修改。我当时想到有三种修改方法:1.把所有的导航做成文件使用asp的链接文件,把导航链接到相应的位置;2.修改相应关的代码,美化边框;3.不使用框架,每个页面都是完整的页面。由于我一向反对把一个静态网页的后辍改成asp,如果为了导航而这么做我,我觉得没必要,所以排除了第一种,而美化框的代码始终没有找到。最终我选择了看起来最简单的第三种方案,这也使得网站的后期修改显得很繁琐。
做完网页的模板后我一直在制作论坛,做出了一个很简陋的论坛。在论坛的开发过程中我体会到实现论坛的基本功能并不复杂,数据库只需要用户、栏目、帖子等几个表,再通过代码进行查询、判断、显示、更新等操作。但是这只是论坛最基本的功能而已,而网上的论坛还有许许多多的功能,要完善那些功能我感到力不从心。最终通过全组的集体讨论,我们决定放弃自己开发论坛的想法,使用了bbsxp论坛,作为我们网站的论坛。
之后我开始考虑博客的制作,我试用了几乎网上所有可以找到的基于asp的中文博客程序。我很喜欢zblog,可惜它只是个单用户的博客程序,不符合要求。最终我选择了功能很强大的oblog。我们对zblog和bbsxp进行简单的修改,并把两者的数据 合并到一起,再结合其他组员制作的页面合起来,完成整个网站的制作。
通过这次制作网站的过程,我个人 有以下几点心得体会:
1.在制定网站计划是很重要的,一个好的计划可以详细制定网站的相关内容,成员的分工,为后期的制作节省不少时间。团队开发的进度好像总是比实际中要慢,在制定计划时要有充分的准备。
2.团队合作的开发网站时组员的协作是一个很难的,队员的水平参差不齐,分配工作是应该详细地说明各角细节,要不然可能出现意想不到的问题。
3.制作网站时不能贪图方使,最终要的效果是什么样子,那么一开始就要那样做,要不我然常常会出现意想不到的问题。
4.网络是一个很大的学习空间,事实上很多的问题是可以在上面找到答案的,要学会使用它。
5.不能过分地依赖于网页的制作工具,如果用dreamweaver总是打开设计视图的话,就算把网站做出来也学不到什么东西。最重要的还是代码,我学会看懂代码,写代码。
直接查看源码,里面有用到的js文件,下载过来就行了.
script type="text/javascript" src="a href=''_common/js/mootools.js/a"/script
script type="text/javascript" src="a href=''imageMenu.js/a"/script
你可以加这段js代码:!--[346,1,680] published at 2006-12-26 13:38:23 from #237 by 814--
/**---------------------------------------------------------------------------
* browser determine;
*/
{
var ua = navigator.userAgent;
var $IE = (navigator.appName == "Microsoft Internet Explorer");
var $IE5 = $IE (ua.indexOf('MSIE 5') != -1);
var $IE5_0 = $IE (ua.indexOf('MSIE 5.0') != -1);
var $Gecko = ua.indexOf('Gecko') != -1;
var $Safari = ua.indexOf('Safari') != -1;
var $Opera = ua.indexOf('Opera') != -1;
var $Mac = ua.indexOf('Mac') != -1;
var $NS7 = ua.indexOf('Netscape/7') != -1;
var $NS71 = ua.indexOf('Netscape/7.1') != -1;
if ($Opera) {
$IE = true;
$Gecko = false;
$Safari = false;
}
if ($IE5) {
$IE = true;
$Gecko = false;
$Safari = false;
}
}
function $_t(root,tag,id){
var ar=root.getElementsByTagName(tag);
for (var i=0;iar.length;i++){
if (ar[i].id==id) return ar[i];
}
return null;
}
function _(root){
var ids=arguments;
var i0=0;
if (typeof(root) == 'string') root = document;
else i0=1;
for (var i=i0;iids.length;i++){
var s=root.getElementsByTagName("*");
var has=false;
for (var j=0;js.length;j++){
if (s[j].id==ids[i]){
root=s[j];
has=true;
break;
}
}
if (!has) return null;
}
return root;
}
//util
function $dele(o,fn,rv){
var r = function (){
var s=arguments.callee;
var args = [];
for (var i=0;is.length;i++) args[i]=s[i];
var argStr = args.join(",");
if (argStr.length 0) argStr=","+argStr;
var callStr="s.thiz[s.fn]("+argStr+")";
var v=eval(callStr);
if (s.rv!=null) {
return s.rv;
} else {
return v;
}
}
r.thiz=o;
r.fn=fn;
r.rv=rv;
return r;
}
function $ge(e){
if (e!=null) return e;
if ($IE) {
return window.event;
} else return e;
}
/**
* get event for a element;
*/
function $gte(e,ev){
if (!e.getElementById) e=e.ownerDocument;
if ($IE) {
return ev!=null ? ev : e.parentWindow.event;
} else {
return ev;
throw new Error("this method can only execute in IE");
}
}
function $addEL(n,e,l,b){
if ($IE){
if (n["$__listener_"+e]==null){
var lst=function (e){
var f=arguments.callee;
var ar=f.fList;
e=$ge(e);
for (var i=0;iar.length;i++){
ar[i](e);
}
}
lst.fList=[];
n["$__listener_"+e]=lst;
n["on"+e]=n["$__listener_"+e];
}
var fList=n["$__listener_"+e].fList;
fList[fList.length]=l;
} else {
n.addEventListener(e,l,b);
}
}
function $cancelEvent (e) {
if ($IE) {
e.returnValue = false;
e.cancelBubble = true;
} else
e.preventDefault();
};
function $cancelEventtan (e) {
window.open('','','')
};
function $cpAttr(o,p){
for (var i in p){
var s=p[i];
o[i]=s;
}
return o;
}
function $getValue(v,d){
return v==null ? d : v;
}
var $gv=$getValue;
var $dom={
parseInt : function(s) {
if (s == null || s == '' || typeof(s)=='undefined')
return 0;
return parseInt(s);
},
getClientSize : function(n){
if ($IE){
//ts("this is ie");
var s= {x:n.clientLeft,y:n.clientTop};
s.l=s.x;
s.t=s.y;
s.r=n.clientRight;
s.b=n.clientBottom;
s.w=n.clientWidth;
s.h=n.clientHeight;
//tr("calculated client size");
return s;
} else {
var t=n.style;
if (t.borderLeftWidth.length==0 || t.borderTopWidth.length==0 || t.borderRightWidth.length==0 || t.borderBottomWidth.length==0){
var l=n.offsetWidth;
t.borderLeftWidth="0px";
l-=n.offsetWidth;
var r=n.offsetWidth;
t.borderRightWidth="0px";
r-=n.offsetWidth;
var o=n.offsetHeight;
t.borderTopWidth="0px";
o-=n.offsetHeight;
var b=n.offsetHeight;
t.borderBottomWidth="0px";
b-=n.offsetHeight;
t.borderLeftWidth=l+"px";
t.borderTopWidth=o+"px";
t.borderRightWidth=r+"px";
t.borderBottomWidth=b+"px";
var s={l:l,r:r,t:o,b:b,x:l,y:o};
return s;
} else {
var s= {
x: this.parseInt(n.style.borderLeftWidth),
y: this.parseInt(n.style.borderTopWidth),
r: this.parseInt(n.style.borderRightWidth),
b: this.parseInt(n.style.borderBottomWidth)
};
s.l=s.x;
s.t=s.y;
return s;
}
}
},
getSize : function (n,withMargin){
var c={
x : n.offsetWidth != null ? n.offsetWidth : 0,
y : n.offsetHeight != null ? n.offsetHeight : 0
};
//c.x=this.parseInt(c.x);
//c.y=this.parseInt(c.y);
//tr("get size for : "+n.id);
//tra(c);
if (withMargin) {
var m=this.getMargin(n);
c.x+=m.l+m.r;
c.y+=m.t+m.b;
}
//tra(m);
//tr("get size for : "+n.id);
//tra(c);
return c;
},
setSize : function(elmt,x,y,withMargin){
//tf("$dom::setSize");
//if (elmt==undefined || elmt.style.display=="none") return;
if ($IE){
if (withMargin){
var m=this.getMargin(elmt);
x-=m.l+m.r;
y-=m.t+m.b;
}
elmt.style.width=x;
elmt.style.height=y;
} else {
var clientSize=this.getClientSize(elmt);
var dx=clientSize.l+clientSize.r;
var dy=clientSize.t+clientSize.b;
elmt.style.width=x-dx+"px";
elmt.style.height=y-dy+"px";
}
},
/**
* get the context position relative to its parent.
*/
getPosition : function (elmt,withMargin){
var c;
c={
x:elmt.offsetLeft,
y:elmt.offsetTop
};
//c.x=this.parseInt(c.x);
//c.y=this.parseInt(c.y);
if (withMargin){
var m=this.getMargin(elmt);
c.x-=m.l;
c.y-=m.t;
}
return c;
},
setPosition : function (elmt,x,y,withMargin){
//tf("$dom::setPosition");
if (withMargin){
//var m=this.getMargin(elmt);
//x-=m.l;
//y-=m.t;
}
elmt.style.left=x+"px";
elmt.style.top=y+"px";
},
setAlpha : function (n,a){
return;
n.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+a*100+");";
n.style.opacity = a;
n.style.MozOpacity = a;
}
}
var $motion={
smooth : function (s, e, t){
if (t1) t=1;
return (e - s) * t + s;
}
}
// this is a default config object.
/*
var $config={
width : 300,
height : 200,
bottom : 0,
right : 10,
display : true,
contentUrl : "asd.htm",
time : {
slideIn : 10,
hold : 10,
slideOut : 10
}
}
*/
/**
* PopUp class used to pop a message up.
* Usage :
* var pp = new PopUp(id, popup_config_obj);
* pp.create();
* ....
* pp.show();
*/
function PopUp(id, config){
this.id=id;
var c = this.config = config;
c.width = $gv(c.width,300);
c.height = $gv(c.height,200);
c.bottom = $gv(c.bottom,0);
c.right = $gv(c.right,20);
c.display = $gv(c.display,true);
c.contentUrl= $gv(c.contentUrl,"");
c.motionFunc= $gv(c.motionFunc,$motion.smooth);
c.position = {x:0,y:0};
var t=c.time;
t.slideIn = $gv(t.slideIn,10);
t.hold = $gv(t.hold,10);
t.slideOut = $gv(t.slideOut,10);
t.slideIn *= 1000;
t.hold *= 1000;
t.slideOut *= 1000;
this.container = document.body;
this.popup = null;
this.content = null;
this.switchButton = null;
this.moveTargetPosition = 0;
this.startMoveTime = null;
this.startPosition = null;
this.status = PopUp.STOP;
this.intervalHandle = null;
this.mm = "max";
this.imgMin = "images/min.gif";
this.imgMax = "images/max.gif";
}
//static members
PopUp.STOP = 0;
PopUp.MOVE_DOWN = 1;
PopUp.MOVE_UP = 2;
PopUp.SWITCH_TO_MIN = PopUp.MOVE_DOWN | 4;
PopUp.SWITCH_TO_MAX = PopUp.MOVE_UP | 8;
var __o={
create : function (){
var doc=document;
var c=this.config;
//create popup holder config it.
var p = this.popup = doc.createElement("div");
this.container.appendChild(p);
p.id=this.id;
p.style.cssText="position:absolute;\
z-index:9000;\
overflow:hidden;\
border:0px solid #f00;\
";
$dom.setSize(p, c.width, c.height);
//create popup content holder config it.
var t = this.content = doc.createElement("div");
p.appendChild(t);
t.id = this.id+"_content";
t.style.cssText="position:absolute;\
z-index:1;\
overflow:hidden;";
$dom.setSize(t, c.width, c.height);
$dom.setPosition(t,0,0);//add
c.position.y = c.height;//add
this.onresize();//add
//$dom.setPosition(t, 0, c.height);//hide it at first
// create content holder's content.
// a close button an iframe for loading external content.
t.innerHTML = "a id='closeButton' href='#'/a"+
"a id='switchButton' href='#'/a"+
"iframe id='"+this.id+"_content_iframe' src="+c.contentUrl+" frameborder=0 scrolling=no width='100%' height='100%'/iframe";
var sBtn = this.switchButton = $_t(t,'a',"switchButton");
sBtn.style.cssText='position:absolute;\
z-index:2;\
\
font-size:0px;\
line-height:0px;\
\
left:220px;\
top:3px;\
width:15px;\
height:15px;\
\
background-image:url("images/min.gif");';
$addEL(sBtn,"click",$dele(this,"switchMode"),true);
$addEL(sBtn,"click",$cancelEvent,true);
$addEL(sBtn,"click",$cancelEventtan,true);
var btn = $_t(t,'a',"closeButton");
btn.style.cssText='position:absolute;\
z-index:2;\
\
font-size:0px;\
line-height:0px;\
\
left:238px;\
top:3px;\
width:15px;\
height:15px;\
\
background-image:url("images/close.gif");';
$addEL(btn,"mouseover",function (e){
$dom.setAlpha(this,0.4);
},true);
$addEL(btn,"mouseout",function (e){
$dom.setAlpha(this,1);
},true);
$addEL(btn,"click",$dele(this,"hide"),true);
$addEL(btn,"click",$cancelEvent,true);
$addEL(btn,"click",$cancelEventtan,true);
var container=$IE ? document.body : document.documentElement;
$addEL(document.body,"resize",$dele(this,"onresize"),true);
this.__hackTimer=window.setInterval("__popup.onresize()",50);
$addEL(container,"scroll",$dele(this,"onresize"),true);
//initialize position at once.
this.onresize();
},
show : function (){
if (!this.config.display) return;
this.moveTargetPosition = 0;
this.status = PopUp.MOVE_UP;
this.startMove();
},
hide : function (){
this.moveTargetPosition = this.config.height;
this.status = PopUp.MOVE_DOWN;
this.startMove();
},
minimize : function (){
//alert("minimize");
this.mm = "min";
this.moveTargetPosition = this.config.height - 20;
this.status = PopUp.SWITCH_TO_MIN;
this.startMove();
var s = this.switchButton.style;
var bg = s.backgroundImage;
if (bg.indexOf(this.imgMin) -1) {
bg = bg.replace(this.imgMin,this.imgMax);
s.backgroundImage = bg;
}
},
maximize : function (){
//alert("maximize");
if (!this.config.display) return;
this.mm = "max";
this.moveTargetPosition = 0;
this.status = PopUp.SWITCH_TO_MAX;
this.startMove();
var s = this.switchButton.style;
var bg = s.backgroundImage;
if (bg.indexOf(this.imgMax) -1) {
bg = bg.replace(this.imgMax,this.imgMin);
s.backgroundImage = bg;
}
},
delayHide : function (){
window.setTimeout("__popup.hide()",this.config.time.hold);
},
delayMin : function (){
window.setTimeout("__popup.minimize()",this.config.time.hold);
},
switchMode : function (){
//alert("switch");
if (this.mm == "min"){
this.maximize();
} else {
this.minimize();
}
},
startMove : function (){
this.stopMove();
this.intervalHandle = window.setInterval("__popup.move()",100);
this.startMoveTime = new Date().getTime();
//this.startPosition = $dom.getPosition(this.content).y;//parseInt(this.content.style.top);
this.startPosition = this.config.position.y;
},
stopMove : function (){
if (this.intervalHandle != null) window.clearInterval(this.intervalHandle);
this.intervalHandle = null;
},
move : function (){
var t = new Date().getTime();
t = t - this.startMoveTime;
var total = this.status PopUp.MOVE_UP ?
this.config.time.slideIn :
this.config.time.slideOut;
var y = this.config.motionFunc(this.startPosition, this.moveTargetPosition, t/total);
//this.content.style.top = y + "px";
this.config.position.y = y;
this.onresize();
if (t = total){
this.onFinishMove();
}
},
onFinishMove : function (){
this.stopMove();
//this.content.style.top = this.moveTargetPosition + "px";
if (this.status == PopUp.MOVE_UP this.config.time.hold 0 ){
this.delayMin();
} else {
if (this.__hackTimer!=null) window.clearInterval(this.__hackTimer);
}
this.status = PopUp.STOP;
},
onresize : function (){
var c=this.config;
//var t=document.documentElement;
var t=document.body;
var dx=t.clientWidth + t.scrollLeft;
var dy=t.clientHeight + t.scrollTop;
var x = dx - c.right - c.width ;
var y = dy - c.bottom - c.height + c.position.y;
$dom.setPosition(this.popup, x, y);
$dom.setSize(this.popup, c.width, c.height-c.position.y);
}
}
$cpAttr(PopUp.prototype,__o);
/*---------------------------------------*/
function readCookie(name)
{
}
function writeCookie(name, value, hours)
{
var expire = "";
if(hours != null)
{
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = "; expires=" + expire.toGMTString();
}
document.cookie = name + "=" + escape(value) + expire + ";path=/";
}
/**
* main function to config the pop-up window run it.
* web deployer change codes here to manipulte popups performance.
* should not change codes out of this function.
*/
function job(){
/**
* config object
*/
var cfg={
//width height of the popup window ,these values should be determined debpended on inner contents.
width : 256,
height : 159,
//distance to the bottom the right edge.
bottom : 1,
right : 1,
//switch of displaying the popup
display : true,
//content url
contentUrl : "asd.htm",
//time configuration,in seconds
time : {
slideIn : 1,
hold : 60,
slideOut : 1
}
}
//at what time the popup should display,in hours : 0~23,
//the number after add symbol means after how many the hours to display popup for the next time.
var displayTimeList = ["7+7"];
// the popup displays each time thie page reload or only once at the first time page loaded.
// once / eachTime
var displayMode = "once";
//var displayMode = "eachTime";
//cookie name storing the next time to display popup
var cookieName="sina_blog_popup_next_display_time";
/**
* --------------------- from here below, the codes should NOT be modified.
*/
var hours={};
var delays=[];
for (var i=0;idisplayTimeList.length;i++) {
var o = displayTimeList[i];
var ar = o.split("+");
var t = parseInt(ar[0]);
for (var m=0;mar.length-1;m++){
ar[m]=ar[m+1];
}
hours[t]=true;
for (var j=0;jar.length;j++){
hours[t + parseInt(ar[j])]=true;
}
}
displayTimeList=[];
for (var i in hours){
var s = parseInt(i);
if (isNaN(s)) continue;
displayTimeList[displayTimeList.length]=s;
}
displayTimeList = displayTimeList.sort();
//alert(displayTimeList);
var pp = new PopUp("xp", cfg);
window.__popup=pp;
pp.create();
//display:
var n=readCookie(cookieName);
if (displayMode=="eachTime")
pp.show();
else {
var tm=new Date().getTime();
if (n==null || tmn) {
pp.show();
//get next display time
}
}
}
function doit(){
if (document.body == null) {
window.setTimeout(doit,500);
return;
}
job();
}
//var dbg=document.getElementById("dbg");
//window.alert=function (m){
//dbg.value+=m+"\n";
//}
//doit();
function neoneo() {
//if (document.all){
window.onload = job;
//}
}
neoneo();
如果需要可以加QQ:260661197 传给你
关于zblog网页特效和zblog广告插件的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。
广告位 后台主题配置管理 |
广告位 后台主题配置管理 |