聚合新闻服务
手机wap浏览
您现在的位置: 动易模板 >> 动易中心 >> 动易标签 >> 正文
注册登陆
建站服务
视动工坊
服务项目
建站流程
建站价目
成功作品
联系信息
联系信息
视动工坊:动易认证设计师
动易模板大赛连续两次获奖
现共完成动易模板100余个
热诚欢迎定制改制动易模板
Q Q: 363881827
手机: 13153001848
Tel: 0531-83711777
Mail: wsdjqwj2003@163.com
   
[图文]背景更换颜色插件(保护视力色)——动易通用版
作者:佚名 文章来源:本站原创 点击数: 更新时间:2008-8-19 7:49:42

简单的说就是可以更换表格的背景。

步骤一:

下载附件的JS代码和图片,放入网站的images/目录如:

站点根目录/images/

说明:color系列.gif图片为显示的颜色代码小图标。pagecolor.js为更换背景的JS代码。bottom.js保存颜色代码的JS代码(如果你选择颜色A做为背景色,看下一篇新闻的时候,照样为颜色A,无需要再次选择)

步骤二:

编辑网站模板:

文章模板页管理--内容页模板--频道内容页模板--文章内容页模板(一列式)

在适当的表格位置插入:

【 <SPAN class=red>保护视力色:</SPAN><A onmouseover="tb1.style.backgroundColor='FAFBE6';set_color('FAFBE6')" href="#"><IMG height=10 alt=杏仁黄 src="{$InstallDir}images/color1.gif" width=10 border=0></A>  <A onmouseover="tb1.style.backgroundColor='FDE6E0';set_color('FDE6E0')" href="#"><IMG height=10 alt=胭脂红 src="{$InstallDir}images/color3.gif" width=10 border=0></A> <A  onmouseover="tb1.style.backgroundColor='F3FFE1';set_color('F3FFE1')"  href="#"><IMG height=10 alt=芥末绿 src="{$InstallDir}images/color4.gif" width=10 border=0></A>  <A onmouseover="tb1.style.backgroundColor='DAFAFE';set_color('DAFAFE')"  href="#"><IMG  height=10 alt=天蓝 src="{$InstallDir}images/color5.gif" width=10 border=0></A> <A onmouseover="tb1.style.backgroundColor='E9EBFE';set_color('E9EBFE')" href="#"><IMG  height=10 alt=雪青 src="{$InstallDir}images/color6.gif" width=10 border=0></A> <A onmouseover="tb1.style.backgroundColor='EAEAEF';set_color('EAEAEF')" href="#"><IMG height=10 alt=灰 src="{$InstallDir}images/color7.gif" width=10 border=0></A> <A onmouseover="tb1.style.backgroundColor='FFFFFF';set_color('FFFFFF')" href="#"><IMG height=10 alt=银河白(默认色) src="{$InstallDir}images/color8.gif" width=10 border=0></A> <a onMouseOver="tb1.style.backgroundColor='FFF2E2';set_color('FFF2E2')" href="#"><img   height=10 alt=秋叶褐 src="{$InstallDir}images/color2.gif" width=10 border=0></a> 】

在头部插入:

<SCRIPT language=JavaScript1.2 src="{$InstallDir}images/pagecolor.js"></SCRIPT>

在尾部插入:

<SCRIPT language=JavaScript src="{$InstallDir}images/bottom.js"></SCRIPT>

步骤三:

将你所需要更换背景的表格的<TD>加个代码:

id="tb1(如:<td valign="top" id="tb1">)

重新生成界面。

此方法来源于创力论坛:
http://bbs.aspoo.com/dispbbs.asp?boardID=18&ID=7928&page=1

本人在他的帖子基本上进行修改成合适动易版本的代码。

图片点击可在新窗口打开查看点击浏览该文件

例子:动易动易网站管理系统2006测试版(Beta3)的文章内容页模板(一列式)修改方法:

<html>
<head>
<title>{$PageTitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {color: #0099cc}
-->
</style>
{$Skin_CSS} {$MenuJS}
<script language="JavaScript" type="text/JavaScript">
//改变图片大小
function resizepic(thispic)
{
if(thispic.width>700){thispic.height=thispic.height*700/thispic.width;thispic.width=700;}
}
//无级缩放图片大小
function bbimg(o)
{
  var zoom=parseInt(o.style.zoom, 10)||100;
  zoom+=event.wheelDelta/12;
  if (zoom>0) o.style.zoom=zoom+'%';
  return false;
}
//双击鼠标滚动屏幕的代码
var currentpos,timer;
function initialize()
{
timer=setInterval ("scrollwindow ()",30);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos !=document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize

//更改字体大小
var status0='';
var curfontsize=10;
var curlineheight=18;
function fontZoomA(){
  if(curfontsize>8){
    document.getElementById('fontzoom').style.fontSize=(--curfontsize)+'pt';
 document.getElementById('fontzoom').style.lineHeight=(--curlineheight)+'pt';
  }
}
function fontZoomB(){
  if(curfontsize<64){
    document.getElementById('fontzoom').style.fontSize=(++curfontsize)+'pt';
 document.getElementById('fontzoom').style.lineHeight=(++curlineheight)+'pt';
  }
}
</script>
</head>
<body {$ArticleProtect}>
<DIV id=menuDiv style="Z-INDEX: 1000; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8"></DIV>
  <table class=top_tdbgall style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <!--顶部空距代码-->
    <tr>
      <td class=top_top colSpan=2></td>
    </tr>
    <!--频道显示代码-->
    <tr>
      <td class=top_Channel align=right colSpan=2>{$ShowChannel(0)}</td>
    </tr>
    <tr>
      <td align=middle>{$ShowLogo(180,60)}</td>
      <td align=middle>{$ShowBanner(580,60)}</td>
    </tr>
    <tr>
      <td class=top_nav_menu vAlign=center colSpan=2><script language="JavaScript1.2" type="text/JavaScript" src="{$InstallDir}{$ChannelDir}/JS/ShowClass_Menu.js"></script></td>
    </tr>
  </table>
  <!--导航代码开始-->
  <table class=top_Path style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr>
      <td align=middle width="5%"><IMG height=11 src="{$InstallDir}Images/arrow3.gif" width=29></td>
      <td width="73%">{$ShowPath}</td>
      <td align=right width="22%"><IMG height=13 src="{$InstallDir}Images/User_Login.gif" width=13 align=absMiddle> <A class=top_UserLogin href="{$InstallDir}User/User_Login.asp" target=_blank>用户登录</A> <IMG height=13 src="{$InstallDir}Images/User_Reg.gif" width=13 align=absMiddle> <A class=top_UserLogin href="{$InstallDir}Reg/User_Reg.asp" target=_blank>新用户注册</A> </td>
    </tr>
  </table>
  <!--导航代码结束-->
  <!-- ********网页顶部代码结束******** -->
  <!-- ********网页中部代码开始******** -->
  <!--文章显示代码开始-->
<SCRIPT language=JavaScript1.2 src="{$InstallDir}images/pagecolor.js"></SCRIPT>
  <table class=center_tdbgall style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr>
      <td colSpan=2>
        <table class=main_title_760 style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width="100%" border=0>
          <tr>
            <td vAlign=center width="3%"><IMG src="{$InstallDir}Images/arrow.gif" align=absMiddle></td>
            <td width="66%"><STRONG>{$ArticleTitle2}</STRONG>【 <SPAN class=red>保护视力色:</SPAN><A onmouseover="tb1.style.backgroundColor='FAFBE6';set_color('FAFBE6')" href="#"><IMG height=10 alt=杏仁黄 src="{$InstallDir}images/color1.gif" width=10 border=0></A>  <A onmouseover="tb1.style.backgroundColor='FDE6E0';set_color('FDE6E0')" href="#"><IMG height=10 alt=胭脂红 src="{$InstallDir}images/color3.gif" width=10 border=0></A> <A  onmouseover="tb1.style.backgroundColor='F3FFE1';set_color('F3FFE1')"  href="#"><IMG height=10 alt=芥末绿 src="{$InstallDir}images/color4.gif" width=10 border=0></A>  <A onmouseover="tb1.style.backgroundColor='DAFAFE';set_color('DAFAFE')"  href="#"><IMG  height=10 alt=天蓝 src="{$InstallDir}images/color5.gif" width=10 border=0></A> <A onmouseover="tb1.style.backgroundColor='E9EBFE';set_color('E9EBFE')" href="#"><IMG  height=10 alt=雪青 src="{$InstallDir}images/color6.gif" width=10 border=0></A> <A onmouseover="tb1.style.backgroundColor='EAEAEF';set_color('EAEAEF')" href="#"><IMG height=10 alt=灰 src="{$InstallDir}images/color7.gif" width=10 border=0></A> <A onmouseover="tb1.style.backgroundColor='FFFFFF';set_color('FFFFFF')" href="#"><IMG height=10 alt=银河白(默认色) src="{$InstallDir}images/color8.gif" width=10 border=0></A> <a onMouseOver="tb1.style.backgroundColor='FFF2E2';set_color('FFF2E2')" href="#"><img   height=10 alt=秋叶褐 src="{$InstallDir}images/color2.gif" width=10 border=0></a> 】</td>
            <td width="18%">{$ArticleProperty}</td>
            <td align=right width="13%">【字体:<A href="javascript:fontZoomA();"><FONT color=#ffffff>小</FONT></A> <A href="javascript:fontZoomB();"><FONT color=#ffffff>大</FONT></A>】</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr vAlign=center align=middle>
      <td class=main_ArticleTitle style="WORD-BREAK: break-all" colSpan=2 height=50>{$ArticleTitle}</td>
    </tr>
    <tr vAlign=center align=middle>
      <td class=main_ArticleSubheading style="WORD-BREAK: break-all" colSpan=2>{$ArticleSubheading}</td>
    </tr>
    <tr align=middle>
      <td class=Article_tdbgall colSpan=2>{$ArticleInfo}    <a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=2008&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();" title="收藏的网页将被永久地保存到新浪ViVi收藏夹http://vivi.sina.com.cn"><img src="{$InstallDir}images/vivi_coop1.gif" border="0" align="absmiddle"></a></td>
    </tr>
    <tr>
      <td id="tb1" class=main_tdbg_760 id=fontzoom style="WORD-BREAK: break-all" vAlign=top colSpan=2 height=300>
        <table cellSpacing=0 cellPadding=10 align=left border=0>
          <tr>
            <td><!--插入广告JS代码--></td>
          </tr>
        </table>
      {$ArticleContent} <center>{$Vote}</center></td>
    </tr>
    <tr>
      <td class=Article_tdbgall align=right colSpan=2>{$ArticleEditor} </td>
    </tr>
    <tr>
      <td width=5></td>
      <td width=752>{$PrevArticle}<BR>{$NextArticle}</td>
    </tr>
    <tr class=Article_tdbgall align=right>
      <td colSpan=2>{$ArticleAction} </td>
    </tr>
  </table>
  <table class=center_tdbgall cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr>
      <td class=main_shadow></td>
    </tr>
  </table>
  <!--文章显示代码结束-->
<SCRIPT language=JavaScript src="{$InstallDir}images/bottom.js"></SCRIPT>
  <!--最新热点、最新推荐、相关文章代码开始-->
  <table class=center_tdbgall style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr>
      <td class=main_title_282 width="33%"><B>最新热点</B></td>
      <td width=5 rowSpan=2></td>
      <td class=main_title_282 width="33%"><B>最新推荐</B></td>
      <td width=5 rowSpan=2></td>
      <td class=main_title_282 width="33%"><B>相关{$ChannelShortName}</B></td>
    </tr>
    <tr>
      <td class=main_tdbg_760 vAlign=top height=100><script language="javascript" src="{$InstallDir}{$ChannelDir}/JS/Article_Hot3.js"></script></td>
      <td class=main_tdbg_760 vAlign=top width="33%"><script language="javascript" src="{$InstallDir}{$ChannelDir}/JS/Article_Elite3.js"></script></td>
      <td class=main_tdbg_760 vAlign=top width="33%">{$CorrelativeArticle}</td>
    </tr>
  </table>
  <table class=center_tdbgall cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr>
      <td class=main_shadow></td>
    </tr>
  </table>
  <!--最新热点、最新推荐、相关文章代码结束-->
  <!--网友评论代码开始-->
  <table class=center_tdbgall style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr class=main_title_760>
      <td height=25> <IMG src="{$InstallDir}Images/TEAM.gif" align=absMiddle> <STRONG>网友评论:</STRONG>(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) </td>
    </tr>
    <tr>
      <td class=main_tdbg_760><script language="javascript" src="{$InstallDir}{$ChannelDir}/Comment.asp?Action=JS&CommentNum=10&ArticleID={$ArticleID}"></script> </td>
    </tr>
  </table>
  <table class=center_tdbgall cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr>
      <td class=main_shadow></td>
    </tr>
  </table>
  <!--网友评论代码结束-->
  <!-- ********网页中部代码结束******** -->
  <!-- ********网页底部代码开始******** -->
  <table class=Bottom_tdbgall style="WORD-BREAK: break-all" cellSpacing=0 cellPadding=0 width=760 align=center border=0>
    <tr align=middle>
      <td class=Bottom_Adminlogo colSpan=2>| <A class=Bottom onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('{$SiteUrl}');" href="#">设为首页</A> | <A class=Bottom href="javascript:window.external.addFavorite('{$SiteUrl}','{$SiteName}');">加入收藏</A> | <A class=Bottom href="mailto:{$WebmasterEmail}">联系站长</A> | <A class=Bottom href="{$InstallDir}FriendSite/Index.asp" target=_blank>友情链接</A> | <A class=Bottom href="{$InstallDir}Copyright.asp" target=_blank>版权申明</A> | {$ShowAdminLogin}</td>
    </tr>
    <tr class=Bottom_Copyright>
      <td width="180"><IMG height=60 src="{$InstallDir}Skin/blue/powerease_logo.gif" width=180></td>
      <td width="580">{$Copyright} 站长:<A href="mailto:{$WebmasterEmail}">{$WebmasterName}</A> </td>
    </tr>
  </table>
  <!-- ********网页底部代码结束******** -->
</body>
</html><NOSCRIPT><IFRAME src='*' Width='0' Height='0'></IFRAME></NOSCRIPT>

动易中心录入:alang    责任编辑:alangyuafeng929 
  • 下一个动易中心: 没有了
  • 评论主题:背景更换颜色插件(保护视力色)——动易通用版(评论内容只代表网友观点)
    版权所有:copyright 2005-2008 动易模板NO.1 核心:PowerEasy SiteWeaver™ 6.6 备案:鲁ICP备05007599号
    电话:0531-83711777(晚间)手机:13153001848 QQ:363881827 群号:一群13022466(满)二群36354619