基于css和js的背景转换

 

< SCRIPT  language =JavaScript >

<!-- ------------------------------------------------------- -->
<!-- StyleSheet Selector - (c)2001-2004 qwilk@desktopian.org -->
<!-- ------------------------------------------------------- -->

var dtoDesign = '';
var search = 'dtoDesign=';
if (document.cookie.length > 0)
{
    offset 
= document.cookie.indexOf(search);
    
if (offset != -1)
    
{
        offset 
+= search.length;
        end 
= document.cookie.indexOf(";", offset);
        
if (end == -1) end = document.cookie.length;
        dtoDesign 
= (unescape(document.cookie.substring(offset, end)));
    }

}


if (dtoDesign == "green") document.write("<link rel='StyleSheet' href='/css/dto_green.css' type='text/css'>");
else if (dtoDesign == "blue") document.write("<link rel='StyleSheet' href='/css/dto_blue.css' type='text/css'>");
else if (dtoDesign == "red") document.write("<link rel='StyleSheet' href='/css/dto_red.css' type='text/css'>");
else if (dtoDesign == "brown") document.write("<link rel='StyleSheet' href='/css/dto_brown.css' type='text/css'>");
else if (dtoDesign == "grey") document.write("<link rel='StyleSheet' href='/css/dto_grey.css' type='text/css'>");
else if (dtoDesign == "coolblue") document.write("<link rel='StyleSheet' href='/css/dto_coolblue.css' type='text/css'>");
else if (dtoDesign == "wcam") document.write("<link rel='StyleSheet' href='/css/dto_wcam.css' type='text/css'>");
else document.write("<link rel='StyleSheet' href='/css/dto_wcam.css' type='text/css'>");

function SelectDesign(name)
{
    
if (name == "Green") document.cookie = "dtoDesign=green; expires=Saturday, 16-Apr-11 00:00:00 GMT";
    
if (name == "Blue") document.cookie = "dtoDesign=blue; expires=Saturday, 16-Apr-11 00:00:00 GMT";
    
if (name == "Red") document.cookie = "dtoDesign=red; expires=Saturday, 16-Apr-11 00:00:00 GMT";
    
if (name == "Brown") document.cookie = "dtoDesign=brown; expires=Saturday, 16-Apr-11 00:00:00 GMT";
    
if (name == "Grey") document.cookie = "dtoDesign=grey; expires=Saturday, 16-Apr-11 00:00:00 GMT";
    
if (name == "CoolBlue") document.cookie = "dtoDesign=coolblue; expires=Saturday, 16-Apr-11 00:00:00 GMT";
    
if (name == "WinterCamouflage") document.cookie = "dtoDesign=wcam; expires=Saturday, 16-Apr-11 00:00:00 GMT";
    window.location.reload();
}


<!-- -------------------------------------------------- -->

function addSPanel() {
  
if ((typeof window.sidebar == "object"&& (typeof
    window.sidebar.addPanel 
== "function"))
    
{
    window.sidebar.addPanel(
"dto Search",
                            
"http://desktopian.org/q/searchtab.shtml","");//搜索
    }

    
else
    
{
    alert( 
"Your browser does not appear to have a sidebar!  Download Mozilla!" );
    }

}

</ SCRIPT >
<!--  --------------------------------------------------  -->
< META  content ="MSHTML 6.00.2900.3059"  name =GENERATOR ></ HEAD >
< BODY  text =#ffffff  vLink =#57af74  aLink =#57af74  link =#57af74  bgColor =#053015 
topMargin =5 >
< TABLE  width ="100%" >
  
< TBODY >
  
< TR >
    
< TD  align =right ></ TD ></ TR ></ TBODY ></ TABLE >
< TABLE  cellSpacing =10  cellPadding =0  width ="100%"  border =0 >
  
< TBODY >
  
< TR >
    
< TD  vAlign =top  align =left > <!--  ------------------------------------------------------------  -->
      
< TABLE  cellSpacing =0  cellPadding =0  width ="100%"  border =0 >
        
< TBODY >
        
< TR >
          
< TD  class =upperleft2 >< IMG 
            
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif"  
            width
=4 ></ TD >
          
< TD  class =lowerfill >< IMG  height =6 
            
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif"  
            width
=10 ></ TD >
          
< TD  class =lowerfill >< IMG 
            
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif" ></ TD >
          
< TD  class =lowerfill >< IMG  height =6 
            
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif"  
            width
=10 ></ TD >
          
< TD  class =upperright2 >< IMG 
            
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif"  
            width
=4 ></ TD ></ TR >
        
< TR >
          
< TD  class =fill  colSpan =5 >< IMG 
            
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif" ></ TD ></ TR >
        
< TR >
          
< TD  class =sidefill  colSpan =2 >< IMG 
            
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif" ></ TD > <!--  ----------  -->
          
< TD  class =links  align =left > <!--  ----------  -->
            
< TABLE  cellSpacing =0  cellPadding =0  width ="100%"  border =0 >
              
< TBODY >
              
< TR >
                
< TD  class =left  rowSpan =2 >
                  
< TABLE >
                    
< TBODY >
                    
< TR >
                      
< TD  class =logo >< href ="http://desktopian.org/"  
                        target
=_top >< IMG  height =76 
                        
src ="desktopian_org  climbing the path to desktop perfection.files/fill.gif"  
                        width
=378  align =absMiddle 
                  
border =0 ></ A ></ TD ></ TR ></ TBODY ></ TABLE ></ TD >
                
< TD  class =topright >
                  
< SCRIPT  language =JavaScript >
function addPanel() {
  
if ((typeof window.sidebar == "object"&& (typeof
    window.sidebar.addPanel 
== "function"))
    
{
    window.sidebar.addPanel(
"Desktopian",
                            
"http://desktopian.org/why/mozilla_sidebar.php","");
    }

    
else
    
{
    alert( 
"Your browser does not appear to have a sidebar!  Download Mozilla!" );
    }

}

</ SCRIPT >

引用采用:
<
                  
href ="javascript:SelectDesign('Green')" >< IMG 
                  
style ="BACKGROUND-COLOR: #558065"  
                  alt
="The grass *is* greener on the other side!"  
                  src
="desktopian_org  climbing the path to desktop perfection.files/dsgn_green.gif"  
                  align
=absMiddle  border =0 >
</ A >
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值