Website Color Changer

[Total: 0    Average: 0/5]

This script changes the color of your website each hour,day, month or year.

Head Code:

<SCRIPT>
var today = new Date(); 
var time = today.getHours(); 
if( time <= "9" ) { var file = "style0.css";
} else { if( time <= "11" ) { var file = "style1.css";
} else { if( time <= "12" ) { var file = "style2.css";
} else { if( time <= "13" ) { var file = "style3.css";
} else { if( time <= "15" ) { var file = "style4.css";
} else { if( time <= "16" ) { var file = "style5.css";
} else { if( time <= "18" ) { var file = "style6.css";
} else { if( time <= "20" ) { var file = "style7.css";
} else { if( time <= "21" ) { var file = "style8.css";
} else { if( time <= "23" ) { var file = "style9.css";
} } } } } } } } } }
document.write("<link rel='StyleSheet' href='/data/ex_887/"+file+"' type='text/css'>");
</SCRIPT>

Body Code:

<a name="top"></a> 
<h2>Style Preview Page</h2> 
<a href="#text">Text</a> | 
<a href="#headings">Headings</a> | 
<a href="#image">Image</a> | 
<a href="#ul">UL</a> | 
<a href="#ol">OL</a> | 
<a href="#dl">DL</a> 
<hr> 
<a name="text"></a><h3>Text Styles</h3> 
Body sample style text.   
The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.<br><br> 
<p> Paragraph sample style text. 
The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.</p> 
<a href="#top">&lt;A&gt; Anchor sample style text</a><br><br> 
<b>Bold sample style text</b><br><br> 
<i>Italic sample style text</i><br><br> 
<em>Emphasis sample style text</em><br><br> 
<strong>Strong sample style text</strong><br><br> 
<hr> 
<a name="headings"></a> 
<h1>Heading 1</h1> 
<h2>Heading 2</h2> 
<h3>Heading 3</h3> 
<h4>Heading 4</h4> 
<h5>Heading 5</h5> 
<h6>Heading 6</h6> 
<hr> 
<a name="image"></a> 
<h3>Image</h3> 
<img width=100 height=100 src="/js/pic1.gif">  
The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog. 
The quick brown fox jumps over the lazy dog.<br><br> 
<hr> 
<a name="ul"></a> 
<h3>Unordered List</h3> 
<ul> 
<li>List item 1 
<ul> 
<li>List item 1 
<ul> 
<li>List item 1 
<li>List item 2 
</ul> 
<li>List item 2 
</ul> 
<li>List item 2 
</ul> 
<hr> 
<a name="ol"></a> 
<h3>Ordered List</h3> 
<ol type="i"> 
<li>List item I 
<ol type="a"> 
<li>List item A 
<ol type="i"> 
<li>List item i 
<ol type="a"> 
<li>List item a 
<li>List item b 
</ol> 
<li>List item ii 
</ol> 
<li>List item B 
</ol> 
<li>List item II 
</ol> 
<hr> 
<a name="dl"></a> 
<h3>Definition List</h3> 
<dl> 
<dt>Term 1 
<dd>This is the definition of term 1 
<dt>Term 2 
<dd>This is the definition of term 2 
</dl> 

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *