function setCookie(name, value, expireDays){
var currDate = new Date();
//var cookieString = name + '=' + escape(value);
var cookieString = name + '=' + value;
currDate.setTime(currDate.getTime() + (expireDays * 24 * 3600 * 1000));
if(expireDays != null){
cookieString = cookieString + ';expires=' + currDate.toGMTString();
}
documents.cookie = cookieString;
}
function getCookie(name){
if(documents.cookie.length > 0){
var begin = documents.cookie.indexOf(name + '=');
if(begin != -1){
begin += name.length + 1;
end = documents.cookie.indexOf(';', begin);
if(end == -1) end = documents.cookie.length;
return documents.cookie.substring(begin, end);
}else{
return '';
}
}
return '';
}
翻页间隔 1秒 2秒 3秒 5秒 10秒 15秒
提示:点击图片也可翻页
图片主题:保温杯 图片来源:永康市宇泉五金制品厂
保温杯是我们必不可少的生活伴侣,它无处不在的支撑着我们的生活的方方面面。时下,天气一天天炎热起来,大家都免不了忘记保温杯的作用,其实在夏日里保温杯同样是可以把冰凉保持在你的身边的。你可以把冰镇饮料放在保温杯里,在那里都可以享受到冰凉的感觉。不单单是这些,还有保温瓶的颜色,美丽的颜色让你的生活每一处平添一份温馨和快乐,选择自己的杯子,选择自己的温馨生活。
/**
* 连环画处理JS代码
* @author www.hc360.com
*/
(function(){
invalTime = 5;
var cleantime = null;
picNewsDetail = {
/**
*
*/
nextPage:function(){
var url;
url = 'p25084033519-2.shtml';
window.location.href=url+"#cartoon";
},
/**
* ###
*/
prePage:function(){
var url;
url = 'http://infot.hc360.com/2008/01/p10102830558.shtml';
window.location.href=url+"#cartoon";
},
/**
* 页面载入定时器启动
*/
loadIntervalTime:function(){
var news_act = getCookie("pic_news");
if(news_act!=null&&news_act!=""){
var playtime = news_act.split("#");
if(playtime[0]!="stop"){
cleantime = window.setTimeout("picNewsDetail.nextPage()",playtime*1000);
}
}
else{
var ckvalue = "stop#5";
setCookie("pic_news",ckvalue);
this.autoPlayImag();
picNewsDetail.loadIntervalTime();
}
},
/**
* 自动播放或者手动播放
*/
autoIntervalTime:function(object){
if(object=="play"){
setCookie("pic_news","play#5");
}
else if(object=="stop"){
setCookie("pic_news","stop#5");
}
var news_act = getCookie("pic_news");
if(news_act!=null && news_act!=""){
var picCookie = news_act.split("#");
if(picCookie[0]=="play"){
window.clearTimeout(cleantime);
news_act = news_act.replace("play","stop");
setCookie("pic_news",news_act);
this.autoPlayImag();
}else{
playtime = document.getElementById("autoTime").options[document.getElementById("autoTime").selectedIndex].value;
cleantime = window.setTimeout("picNewsDetail.nextPage()",playtime*1000);
news_act = news_act.replace("stop","play");
setCookie("pic_news",news_act);
this.handPlayImag();
}
} else {
this.changePlayTime(5);
cleantime = window.setTimeout("picNewsDetail.nextPage()",5*1000);
}
},
/**
* 更改播放时间
*/
changePlayTime:function(time){
invalTime = time;
this.autoPlayImag();
var ckvalue = "stop#"+invalTime;
setCookie("pic_news",ckvalue);
},
changePicAndTimeState:function(){
var news_act = getCookie("pic_news");
if(news_act!=null && news_act!=""){
var picCookie = news_act.split("#");
this.initSelectItem(document.getElementById("autoTime"),picCookie);
if(picCookie[0]=="stop"){
this.autoPlayImag();
}else{
this.handPlayImag();
}
}else{
this.initSelectItem(document.getElementById("autoTime"),5);
}
},
/**
* 通过参数启动定时器
*/
startAutoPlayByParams:function(){
var ckvalue = "play#5";
setCookie("pic_news",ckvalue);
window.setTimeout("picNewsDetail.nextPage()",5*1000);
},
/**
* 初始化下拉框
* @param {Object} itemName
* @param {Object} value
*/
initSelectItem:function(item,itemValue){
for(var i=0;i
想让您的事业成功吗?
网上赚钱成功三步曲
1
不是会员
2
已是会员 免费宣传产品
3
推广公司 让生意火起来!
|