实用带记录cookie功能背景颜色选择工具栏

2周前 (04-18 11:45)阅读22回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4014
  • 级别管理员
  • 主题802
  • 回复2
楼主

实用的背景颜色选择工具特效,这个工具栏带记录cookie功能,可自定义颜色及数量,选中颜色后立即切换显示。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>实用带记录cookie功能背景颜色选择工具栏_武鸣人</title>
<style type="text/css">
body,div,img{margin:0; padding:0;list-style:none;border:none;font-size:12px;}
#content .article_wwwwumingren { margin:0; margin-top:1px; padding:10px 0 10px 0; font-family:tahoma,宋体; text-align:left; font-size:14px; line-height:23px; table-layout:fixed; width:670px; overflow:hidden; margin-bottom:0px; word-break:break-all; word-wrap:break-word; } 
#content .article_wwwwumingren a { color:#222 } 
.tools { position:absolute; height:20px; right:38px; top:6px; border-right:none; padding:0 10px 0 7px; overflow:hidden; background:#00FF00 url(/img/20240418_www_wuming_ren_2.gif) } 
.tools span { float:left; margin:0 5px } 
.tools a { float:left }
.bg1,.bg2,.bg3,.bg4,.bg5 { display:block; float:left; width:10px; height:10px; margin:0 1px; margin-top:4px; border:1px solid #bebebe; font-size:0 } 
.tools .fz_span { margin:0} 
.tools .fz_spanz { margin:0 0 0 5px } .fz_spanz a { color:#19489E; float:left; margin:-1px 2px 0 0; margin:0 2px 0 0 } 
.tools a.fs { color:#19489E } 
.bg1 { background:#00FF00 } 
.bg2 { background:#336649 } 
.bg3 { background:#9900FF } 
.bg4 { background:#FFFF00 }
.bg5 { background:#333 }
#content .bar_www_wuming_ren {height:22px;line-height:22px; padding:4px 0;color:#7B7B7B;border-bottom:1px solid #ddd;text-align:left; width:670px;position:relative; }
#content .bar_www_wuming_ren a{font-family:Verdana,宋体; color:#1948ae;}
#content .bar_www_wuming_ren strong{ font-weight:400; color:#1948ae;}
#content .bar_www_wuming_ren .btn_fontsize {position:absolute; right:0px; top:6px;CURSOR: pointer;} 
#content .bar_www_wuming_ren .btn_fontsize img {float:left;}
</style>
<script type="text/javascript">
function getcookie_wwwwumingren(name)
{//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getcookieval_wuming_ren (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function setcookie_www_wuming_ren(name, value)
{
var expires = new Date();
expires.setTime(expires.getTime() + 12 * 30 * 24 * 60 * 60 * 1000);
document.cookie = name + "=" + value + ";expires=" + expires.toGMTString();
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function getcookieval_wuming_ren(offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function put_layer(no) 
{
 if ( !!no ) 
 { 
 obj = document.getElementById("put_layer" + no);
 if ( obj.style.display != "none" ) {
    obj.style.display = "none"; 
}
else {
   obj.style.display = "block";
}
  } 
} 
//工具栏
var tfs=getcookie_wwwwumingren('wuming_ren_1');
var tbg=getcookie_wwwwumingren('wuming_ren_2');
var tfc=getcookie_wwwwumingren('wuming_ren_3');
if (tfs != null){
document.write ('<style type="text/css">');
document.write ('#wwwwumingren {  font-size: '+tfs+'px; }');
document.write ('</style>');
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
if (tbg != null){
document.write ('<style type="text/css">');
document.write ('#wwwwumingren {  background-color: '+tbg+' }');
document.write ('</style>');
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
if(tfc != null)
{
document.write('<style type="text/css">');
document.write('#wwwwumingren {color:'+tfc+'}');
document.write ('</style>');
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function wwwwumingren_1(id){
document.getElementById('wwwwumingren').style.fontSize=id+"px";
setcookie_www_wuming_ren('wuming_ren_1',id);
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function wwwwumingren_2(id){
document.getElementById('wwwwumingren').style.backgroundColor=id;
setcookie_www_wuming_ren('wuming_ren_2',id);
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function wwwwumingren_3(id)
{
document.getElementById('wwwwumingren').style.color = id;
setcookie_www_wuming_ren('wuming_ren_3',id);
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
</script>
</head>
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<div id="content"><div class="bar_www_wuming_ren"><div class="btn_fontsize"><a onFocus="if(this.blur)this.blur()" href="javascript:put_layer(2);"><img src="/img/20240418_www_wuming_ren_1.gif" title="工具栏"/></a></div><div id="put_layer2" class="tools" style="display:none;"><script type="text/javascript">document.writeln("<span class=\"fz_span\">字体<\/span><span class=\"fz_spanz\"><a onclick=\"wwwwumingren_1(\'16\')\" href=\"javascript:void(0)\">大<\/a><a onclick=\"wwwwumingren_1(\'14\')\" href=\"javascript:void(0)\">中<\/a><a onclick=\"wwwwumingren_1(\'12\')\" href=\"javascript:void(0)\">小<\/a> <\/span><span>色彩方案<\/span><a class=\"bg1\" onclick=\"wwwwumingren_2(\'#00FF00\');wwwwumingren_3(\'#000\')\" title=\"默认\" href=\"javascript:void(0)\"><\/a><a class=\"bg2\" onclick=\"wwwwumingren_2(\'#336649\');wwwwumingren_3(\'#F5B800\')\" title=\"护眼\" href=\"javascript:void(0)\"><\/a><a class=\"bg3\" onclick=\"wwwwumingren_2(\'#9900FF\');wwwwumingren_3(\'#222\')\" title=\"Admin5\" href=\"javascript:void(0)\"><\/a><a class=\"bg4\" onclick=\"wwwwumingren_2(\'#FFFF00\');wwwwumingren_3(\'#2a2a2a\')\" title=\"Chinaz\" href=\"javascript:void(0)\"><\/a><a class=\"bg5\"onclick=\"wwwwumingren_2(\'#333\');wwwwumingren_3(\'#ccc\')\" title=\"方案5\" href=\"javascript:void(0)\"><\/a>");</script></div></div>
<div class="article_wwwwumingren" id="wwwwumingren" >武鸣人,各种信息免费发布,资源共享合作共赢!
</div>
</div>
</body>
</html>


0
0
收藏0
回帖

实用带记录cookie功能背景颜色选择工具栏 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息