<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[TkPao's Blog - JavaScript]]></title>
<link>http://www.tkpao.com/</link>
<description><![CDATA[面朝大海 春暖花开……]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog3 v2.8]]></copyright>
<webMaster><![CDATA[tkpao@163.com(tkpao)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>TkPao's Blog</title>
	<url>http://www.tkpao.com/images/logos.gif</url>
	<link>http://www.tkpao.com/</link>
	<description>TkPao's Blog</description>
</image>

			<item>
			<link>http://www.tkpao.com/article.asp?id=135</link>
			<title><![CDATA[265天气预报]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Thu,19 Mar 2009 16:52:38 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=135</guid>
		<description><![CDATA[<p><iframe name="265" marginwidth="0" marginheight="0" src="http://www.265.com/weather.htm" frameborder="0" width="168" scrolling="no" height="50"></iframe></p>
<p>&lt;iframe src=&quot;<a href="http://www.265.com/weather.htm">http://www.265.com/weather.htm</a>&quot; width=&quot;168&quot; height=&quot;50&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; name=&quot;265&quot;&gt;&lt;/iframe&gt;</p>]]></description>
		</item>
		
			<item>
			<link>http://www.tkpao.com/article.asp?id=129</link>
			<title><![CDATA[无限级可刷新Js树型菜单]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Wed,18 Mar 2009 16:29:55 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=129</guid>
		<description><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.tkpao.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp59824">
<html> 
<head> 
<title>无限级可刷新Js树型菜单</title> 
<meta content=&#34;text/html; charset=gb2312&#34; http-equiv=&#34;Content-Type&#34;> 
<style type=&#34;text/css&#34;> 

#myid1{ 
position: absolute; 
top:30px; 
left:105px; 
height: 30px; 
width:150px; 
visibility:visible; 
cursor:hand; 
color:red; 
font-size:14px;
} 

#myid2{ 
position:absolute; 
top:60px; 
left:110px; 
width:110px; 
background-color:green; 
color:yellow; 
border-color:red; 
filter:revealTrans(transition=23,duration=0.5); 
visibility:hidden 
} 

a{ 
TEXT-DECORATION: none 
} 
a:hover{ 
color:yellow; 
TEXT-DECORATION: none 
} 
a:visited{ 
color:yellow; 
TEXT-DECORATION: none 
} 

a:link{ 
color:yellow; 
TEXT-DECORATION: none 
} 
</style> 

<meta content=&#34;Microsoft FrontPage 3.0&#34; name=&#34;GENERATOR&#34;> 
<script language=javascript> 
<!-- 
//定义用来表示是否为IE浏览器的变量 
var isIE; 
//定义用来表示菜单是否显示的变量 
var isshow; 
isshow=false; 
//判断用户使用的是不是IE浏览器 
if(document.all) 
{ 
isIE=true; 
} 
else{ 
isIE=false; 
} 

//定义用来处理鼠标点击菜单标题的函数 
function doclick() 
{ 
//如果不是IE浏览器 
if(!isIE) 
{ 
//弹出相应的提示信息 
alert(&#34;请使用IE浏览器浏览本页面!&#34;); 
return true; 
} 
//否则,表示用户使用的是IE浏览器 
else{ 
//如果菜单已经显示 
if(isshow) 
{ 
//装备动态滤镜 
myid2.filters.revealTrans.apply(); 
//设置菜单为隐藏 
myid2.style.visibility = &#34;hidden&#34;; 
//启动滤镜 
myid2.filters.revealTrans.play(); 
//把isshow标记变量设置为false 
isshow=false; 
return true; 
} 
//否则,如果菜单不可见 
else if(!isshow) 
{ 
//装备动态滤镜 
myid2.filters.revealTrans.apply(); 
//设置菜单为可见 
myid2.style.visibility = &#34;visible&#34;; 
//启动滤镜 
myid2.filters.revealTrans.play(); 
//把isshow标记变量设置为true 
isshow=true; 
return true; 
} 
} 
} 
//定义处理鼠标点击页面空白处的函数 
function otherclick() 
{ 
var theobj; 
//取得鼠标点击的对象 
theobj=event.srcElement; 
//如果该对象不是菜单标题和菜单 
if(theobj.id!=&#34;myid1&#34;&amp;&amp;theobj.id!=&#34;myid2&#34;) 
{ 
//如果菜单可见 
if(isshow) 
{ 
//装备动态滤镜 
myid2.filters.revealTrans.apply(); 
//设置菜单为不可见 
myid2.style.visibility = &#34;hidden&#34;; 
//启动滤镜 
myid2.filters.revealTrans.play(); 
//把isshow标记变量设置为false 
isshow=false; 
return; 
} 
//否则,直接返回 
else{ 
return; 
} 
} 
//否则,直接返回 
else{ 
return; 
} 
} 
// --> 
</script> 

</head> 
<body> 
<div id=&#34;myid1&#34; onclick=&#34;doclick()&#34;> 大学主页 </div> 
<div id=&#34;myid2&#34;>南开大学 <br> 
天津大学<br> 
清华大学<br> 
北京大学</div> 
<script language=javascript> 
<!-- 
//如果是IE浏览器 
if(isIE) 
{ 
//设置整个页面的鼠标点击处理程序 
document.body.onclick=otherclick; 
} 
//否则 
else{ 
//弹出警告对话框 
alert(&#34;请使用IE 5.0以上版本的浏览器浏览本页面!&#34;); 
} 
// --> 
</script> 

</body> 
</html> 
</TEXTAREA><br/><INPUT onclick="runEx('temp59824')"  type="button" class="userbutton" value="运行此代码"/> <INPUT onclick="doCopy('temp59824')"  type="button" class="userbutton" value="复制此代码"/> <INPUT onclick="saveCode('temp59824')" type="button" class="userbutton" value="保存此代码"><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div><br/><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.tkpao.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp51538">
<html> 
<head> 
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34;> 
<meta name=&#34;keywords&#34; content=&#34;&#34;> 
<style type=text/css> 
body { 
background:#799AE1; 
margin:0px; 
font:normal 12px 宋体; 
background-color: #000; 
} 
table { border:0px; } 
td { font:normal 12px 宋体; } 
img { vertical-align:bottom; border:0px; } 
a { font:normal 12px 宋体; color:#215DC6; text-decoration:none; } 
a:hover { color:#FFFFFF } 
.sec_menu { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; } 
.menu_title { } 
.menu_title span { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; } 
.menu_title2 { } 
.menu_title2 span { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; } 
</style> 
<script language=javascript> 
function menuShow(obj,maxh,obj2) 
{ 
if(obj.style.pixelHeight<maxh) 
{ 
obj.style.pixelHeight+=maxh/20; 
obj.filters.alpha.opacity+=5; 
obj2.background=&#34;image/menudown.gif&#34;; 
if(obj.style.pixelHeight==maxh/10) 
obj.style.display='block'; 
myObj=obj; 
myMaxh=maxh; 
myObj2=obj2; 
setTimeout('menuShow(myObj,myMaxh,myObj2)','5'); 
} 
} 
function menuHide(obj,maxh,obj2) 
{ 
if(obj.style.pixelHeight>0) 
{ 
if(obj.style.pixelHeight==maxh/20) 
obj.style.display='none'; 
obj.style.pixelHeight-=maxh/20; 
obj.filters.alpha.opacity-=5; 
obj2.background=&#34;image/menuup.gif&#34;; 
myObj=obj; 
myMaxh=maxh 
myObj2=obj2; 
setTimeout('menuHide(myObj,myMaxh,myObj2)','5'); 
} 
else 
if(whichContinue) 
whichContinue.click(); 
} 
function menuChange(obj,maxh,obj2) 
{ 
if(obj.style.pixelHeight) 
{ 
menuHide(obj,maxh,obj2); 
whichOpen=''; 
whichcontinue=''; 
} 
else 
if(whichOpen) 
{ 
whichContinue=obj2; 
whichOpen.click(); 
} 
else 
{ 
menuShow(obj,maxh,obj2); 
whichOpen=obj2; 
whichContinue=''; 
} 
} 
</script> 
<base target=main> 
</head> 

<body onsel&#101;ctstart=&#34;return false;&#34; ondragstart=&#34;return false;&#34; oncontextmenu=&#34;return false;&#34;> 
<table width=158 border=&#34;0&#34; align=center cellpadding=0 cellspacing=0> 
<tr style=&#34;cursor:hand;&#34;> 
<td height=25 class=menu_title id=menuTitle1 onClick=&#34;menuChange(menu1,80,menuTitle1);&#34; 

onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';> 
<span>系统选项</span> 
</td> 
</tr> 
<tr> 
<td> 
<div class=sec_menu style=&#34;width:158px;height:80px;filter:alpha(Opacity=100);overflow:hidden;&#34; id=menu1> 
<table cellpadding=0 cellspacing=0 align=center width=135 style=&#34;position:relative;top:10px;&#34;> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>安全选项</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>垃圾邮件选项</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>动态规则选项</a> 
</td> 
</tr> 
</table> 
</div> 
</td> 
</tr> 
</table> 
<script language=javascript> 
var whichOpen=menuTitle1; 
var whichContinue=''; 
</script> 

<table width=158 border=&#34;0&#34; align=center cellpadding=0 cellspacing=0> 
<tr style=&#34;cursor:hand;&#34;> 
<td height=25 class=menu_title id=menuTitle2 onClick=&#34;menuChange(menu2,120,menuTitle2);&#34; 

onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';> 
<span>系统规则</span> 
</td> 
</tr> 
<tr> 
<td> 
<div class=sec_menu style=&#34;width:158;height:0;filter:alpha(Opacity=0);display:none;&#34; id=menu2> 
<table cellpadding=0 cellspacing=0 align=center width=135 style=&#34;position:relative;top:10px;&#34;> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>IP过滤规则</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>信封过滤规则</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>信头过滤规则</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>信体过滤规则</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>附件过滤规则</a> 
</td> 
</tr> 
</table> 
</div> 
</td> 
</tr> 
</table> 
<table width=158 border=&#34;0&#34; align=center cellpadding=0 cellspacing=0> 
<tr style=&#34;cursor:hand;&#34;> 
<td height=25 class=menu_title id=menuTitle3 onClick=&#34;menuChange(menu3,120,menuTitle3);&#34; 

onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';> 
<span>系统管理</span> 
</td> 
</tr> 
<tr> 
<td> 
<div class=sec_menu style=&#34;width:158;height:0;filter:alpha(Opacity=0);display:none;&#34; id=menu3> 
<table cellpadding=0 cellspacing=0 align=center width=135 style=&#34;position:relative;top:10px;&#34;> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>用户管理</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>进程管理</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>主机运行状态</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>数据备份</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>垃圾目录管理</a> 
</td> 
</tr> 
</table> 
</div> 
</td> 
</tr> 
</table> 

<table width=158 border=&#34;0&#34; align=center cellpadding=0 cellspacing=0> 
<tr style=&#34;cursor:hand;&#34;> 
<td height=25 class=menu_title id=menuTitle4 onClick=&#34;menuChange(menu4,140,menuTitle4);&#34; 

onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';> 
<span>系统统计</span> 
</td> 
</tr> 
<tr> 
<td> 
<div class=sec_menu style=&#34;width:158;height:0;filter:alpha(Opacity=0);display:none;&#34; id=menu4> 
<table cellpadding=0 cellspacing=0 align=center width=135 style=&#34;position:relative;top:10px;&#34;> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();> 
IP过滤统计</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>信封过滤统计</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>信头过滤统计</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>信体过滤统计</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>附件过滤统计</a> 
</td> 
</tr> 
<tr> 
<td height=20> 
<a href=http://www.tkpao.com onfocus=this.blur();>动态规则统计</a> 
</td> 
</tr> 
</table> 
</div> 
</td> 
</tr> 
</table> 

<table width=158 border=&#34;0&#34; align=center cellpadding=0 cellspacing=0> 
<tr style=&#34;cursor:hand;&#34;> 
<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';> 
<span>退出系统</span> </td> 
</tr> 
</table> 
</body> 

</html>
</TEXTAREA><br/><INPUT onclick="runEx('temp51538')"  type="button" class="userbutton" value="运行此代码"/> <INPUT onclick="doCopy('temp51538')"  type="button" class="userbutton" value="复制此代码"/> <INPUT onclick="saveCode('temp51538')" type="button" class="userbutton" value="保存此代码"><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.tkpao.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp29512">
<SCRIPT type=text/javascript>
function blog()
{
 if(document.getElementById(&#34;title&#34;).innerHTML==&#34;+天涯博客&#34;)
 {
 document.getElementById(&#34;title&#34;).innerHTML=&#34;-天涯博客&#34;
 document.getElementById(&#34;blogDIV&#34;).innerHTML=&#34;&amp;nbsp;&amp;nbsp<font color=white>.</font><A href=http://blog.tianya.cn/?idWriter=0&amp;Key=0 target=_blank>博客首页</A><br>&amp;nbsp;&amp;nbsp;<font color=white>.</font><A href=http://cache.tianya.cn/new/techforum/ArticlesList.asp?idWriter=0&amp;Key=0&amp;Part=0&amp;idItem=221 target=_blank>博客论坛</A><br>&amp;nbsp;&amp;nbsp;<font color=white>.</font><A href=http://blog.tianya.cn/blogger/enter.asp?idWriter=0&amp;Key=0 target=rightmain>我的博客</A>&#34;;
 }else
 {
 document.getElementById(&#34;title&#34;).innerHTML=&#34;+天涯博客&#34;;
 document.getElementById(&#34;blogDIV&#34;).innerHTML=&#34;&#34;;
 } 
}

</SCRIPT>
 
<TR><TD  ><DIV id=title onclick=&#34;return blog('blog','天涯博客')&#34;>+天涯博客</DIV></TD></TR>
<DIV id=blogDIV ></DIV>
</TEXTAREA><br/><INPUT onclick="runEx('temp29512')"  type="button" class="userbutton" value="运行此代码"/> <INPUT onclick="doCopy('temp29512')"  type="button" class="userbutton" value="复制此代码"/> <INPUT onclick="saveCode('temp29512')" type="button" class="userbutton" value="保存此代码"><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></description>
		</item>
		
			<item>
			<link>http://www.tkpao.com/article.asp?id=128</link>
			<title><![CDATA[CSS+JS菜单]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Wed,18 Mar 2009 16:08:24 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=128</guid>
		<description><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.tkpao.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp62801"><!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank" rel="external">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;>
<html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank" rel="external">http://www.w3.org/1999/xhtml</a>&#34;>
<head>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; />
<title>CSS+JS菜单</title>
<style type=&#34;text/css&#34;>
body{margin:0 auto;width:800px;font-family:arial;font-size:12px; position:relative;background:url(<a href="http://bbs.blueidea.com/images/default/logo.gif" target="_blank" rel="external">http://bbs.blueidea.com/images/default/logo.gif</a>);}
ul{margin:0;padding:0;list-style:none;}
#navigation{background:#01214F;height:30px;}
	#navigation li{float:left;position:relative;width:150px;}
	#navigation a{color:#fff;display:block;text-indent:1em;height:30px;padding-left:10px;line-height:30px;}
	#navigation a:hover{background:#07172D;}
	#navigation li ul{position:absolute;top:30px;left:0;width:300px;background:#01214F;padding:10px;border-bottom:solid 4px #900;display:none;opacity:0.95;}
		#navigation li ul li{width:150px;float:left;position:static;}
	/*鼠标移上*/
	#navigation li.show ul{display:block;}
		#navigation li.show a{background:#07172D;}
		#navigation li.show ul li a{background:#01214F;}
		#navigation li.show ul li a:hover{background:#1B3962;}
</style>
<!--[if IE]>
<style type=&#34;text/css&#34;>
#navigation li ul{filter:alpha(opacity=95); }
</style>
<![endif]-->
</head>
<body>
<ul id=&#34;navigation&#34;>
	<li>
		<a href=&#34;#&#34;>Menu</a>
		<ul>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
		</ul>
	</li>
	<li>
		<a href=&#34;#&#34;>Menu</a>
		<ul>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
		</ul>
	</li>
	<li>
		<a href=&#34;#&#34;>Menu</a>
		<ul>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
			<li><a href=&#34;#&#34;>menu</a></li>
		</ul>
	</li>
</ul>
</body>
</html>
<script type=&#34;text/javascript&#34;>
function init_navigation(){
	var obj=document.getElementById(&#34;navigation&#34;);
	var liObj=obj.getElementsByTagName(&#34;li&#34;);
	var okLiObj=new Array();
	var length=liObj.length;
	var currentObj=null;
	for(var i=0;i<length;i++){
		currentObj=liObj[i];
		if(currentObj.parentNode==obj){
			okLiObj.push(currentObj);
		}
	}
	length=okLiObj.length;
	for(var i=0;i<length;i++){
		okLiObj[i].onmouseover=function(){
			this.className+=&#34; show&#34;;
		}
		okLiObj[i].onmouseout=function(){
			this.className=this.className.replace(&#34;show&#34;,&#34;&#34;);
		}
		okLiObj[i].onclick=function(){
			this.className=this.className.replace(&#34;show&#34;,&#34;&#34;);
		}
	}
}
init_navigation();
</script>
</TEXTAREA><br/><INPUT onclick="runEx('temp62801')"  type="button" class="userbutton" value="运行此代码"/> <INPUT onclick="doCopy('temp62801')"  type="button" class="userbutton" value="复制此代码"/> <INPUT onclick="saveCode('temp62801')" type="button" class="userbutton" value="保存此代码"><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></description>
		</item>
		
			<item>
			<link>http://www.tkpao.com/article.asp?id=112</link>
			<title><![CDATA[倒计时牌]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Tue,16 Oct 2007 18:04:16 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=112</guid>
		<description><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.tkpao.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp38007">

<script type=&#34;text/javascript&#34;>
thisday=new Date();
thisyear=thisday.getYear();
thismonth=thisday.getMonth()+1;
thisdate=thisday.getDate();

document.write(&#34;<tr>&#34;);
document.write(&#34;<td height=\&#34;30\&#34; background=\&#34;images/acds_bg03.gif\&#34;><span class=\&#34;font-white12\&#34;>　&#34;+thisyear+&#34;年&#34;+thismonth+&#34;月&#34;+thisdate+&#34;日</span><span class=\&#34;font-black12\&#34;>距第29届奥运会开幕</span></td>&#34;);
document.write(&#34;</tr>&#34;);
document.write(&#34;<tr>&#34;);
document.write(&#34;<td height=\&#34;41\&#34; background=\&#34;images/acds_bg04.gif\&#34;><table width=\&#34;165\&#34; border=\&#34;0\&#34; align=\&#34;center\&#34; cellpadding=\&#34;0\&#34; cellspacing=\&#34;0\&#34;>&#34;);
document.write(&#34;<tr>&#34;);
document.write(&#34;<td width=\&#34;83\&#34; rowspan=\&#34;2\&#34; align=\&#34;center\&#34; class=\&#34;font-time1\&#34;><span id=\&#34;dd\&#34;></span></td>&#34;);
document.write(&#34;<td width=\&#34;27\&#34; align=\&#34;center\&#34; valign=\&#34;bottom\&#34; class=\&#34;font-white12\&#34;><span id=\&#34;hh\&#34;></span></td>&#34;);
document.write(&#34;<td width=\&#34;25\&#34; align=\&#34;center\&#34; valign=\&#34;bottom\&#34; class=\&#34;font-white12\&#34;><span id=\&#34;mm\&#34;></span></td>&#34;);
document.write(&#34;<td width=\&#34;30\&#34; align=\&#34;center\&#34; valign=\&#34;bottom\&#34; class=\&#34;font-white12\&#34;><span id=\&#34;ss\&#34;></span></td>&#34;);
document.write(&#34;</tr>&#34;);
document.write(&#34;<tr>&#34;);
document.write(&#34;<td class=\&#34;font-white12\&#34;> </td>&#34;);
document.write(&#34;<td class=\&#34;font-white12\&#34;> </td>&#34;);
document.write(&#34;<td class=\&#34;font-white12\&#34;> </td>&#34;);
document.write(&#34;</tr>&#34;);
document.write(&#34;</table></td>&#34;);
document.write(&#34;</tr>&#34;);

function show_daojishi()
{
	window.setTimeout(&#34;show_daojishi()&#34;, 1000);
	BirthDay=new Date(&#34;August 8, 2008, 20:00:00&#34;);//
	today=new Date();
	timeold=(BirthDay.getTime()-today.getTime());
	sectimeold=timeold/1000;
	secondsold=Math.floor(sectimeold);
	msPerDay=24*60*60*1000
	e_daysold=timeold/msPerDay
	daysold=Math.floor(e_daysold);
	e_hrsold=(e_daysold-daysold)*24;
	hrsold=Math.floor(e_hrsold);
	e_minsold=(e_hrsold-hrsold)*60;
	minsold=Math.floor((e_hrsold-hrsold)*60);
	seconds=Math.floor((e_minsold-minsold)*60);

  //daojishi.innerHTML=daysold+&#34;天&#34;+hrsold+&#34;小时&#34;+minsold+&#34;分&#34;+seconds+&#34;秒&#34; ;
  dd.innerHTML=daysold;
  hh.innerHTML=hrsold;
  mm.innerHTML=minsold;
  ss.innerHTML=seconds;
}
show_daojishi();
</script>
</TEXTAREA><br/><INPUT onclick="runEx('temp38007')"  type="button" class="userbutton" value="运行此代码"/> <INPUT onclick="doCopy('temp38007')"  type="button" class="userbutton" value="复制此代码"/> <INPUT onclick="saveCode('temp38007')" type="button" class="userbutton" value="保存此代码"><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></description>
		</item>
		
			<item>
			<link>http://www.tkpao.com/article.asp?id=104</link>
			<title><![CDATA[JavaScript实例:倒计时]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Thu,20 Sep 2007 16:07:21 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=104</guid>
		<description><![CDATA[<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td class="p3" align="center" width="711"><b>　　　　　倒 计 时</b></td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">效 果 演 示</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td>
            <table height="271" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                <tbody>
                    <tr align="center">
                        <td width="47" height="145">&nbsp; </td>
                        <td valign="top" width="258" background="img/daojishi.jpg" height="145">
                        <p>&nbsp;</p>
                        <p>&nbsp;</p>
                        <br />
                        <script language="JavaScript" type="text/javascript">
                        <!-- //
                        var deadline= new Date("8/8/2008");
                        var  symbol="8月8日";
                        var now = new Date();
                        var leave =deadline.getTime() - now.getTime();
                        var day = Math.floor(leave / (1000 * 60 * 60 * 24));
                        if (day > 0)
                        document.write("今天离"+ symbol+"还有"+day +"天")
                        else if (day == 0)
                        document.write("只有1天啦！")
                        else
                        document.write("唉呀！已经过了！");
                        // -->
                        </script>
                        今天离8月8日还有322天 </td>
                        <td width="152" height="145">&nbsp;</td>
                    </tr>
                </tbody>
            </table>
            <p>&nbsp;</p>
            </td>
        </tr>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr>
                        <td height="30">&nbsp;</td>
                    </tr>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源代码如下</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457"><b><br /><br /></b><span class="p1"><font color="#6633ff"><br />这段程序放在&lt;body&gt;与&lt;/body&gt;之间</font></span><b><br /></b>
            <form>
                <p><textarea onmouseover="this.focus()" style="BACKGROUND-COLOR: #d5e9fd" onfocus="this.select()" rows="10" cols="50" name="textarea">&lt;script language=&quot;JavaScript&quot;&gt;
                &lt;!-- //
                var deadline= new Date(&quot;8/8/2008&quot;);
                var  symbol=&quot;8月8日&quot;;
                var now = new Date();
                var leave =deadline.getTime() - now.getTime();
                var day = Math.floor(leave / (1000 * 60 * 60 * 24));
                if (day &gt; 0)
                document.write(&quot;今天离&quot;+ symbol+&quot;还有&quot;+day +&quot;天&quot;)
                else if (day == 0)
                document.write(&quot;只有1天啦！&quot;)
                else
                document.write(&quot;唉呀！已经过了！&quot;);
                // --&gt;
                &lt;/script&gt;</textarea> </p>
                <p>&nbsp;</p>
            </form>
            <b><br /></b></td>
        </tr>
        <tr>
            <td valign="bottom" align="center">
            <table cellspacing="0" cellpadding="0" width="238" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源程序讲解：</font></b></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457">&nbsp;</td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td class="p2" align="right" width="693"><br />
            <table cellspacing="0" cellpadding="0" width="650" border="0">
                <tbody>
                    <tr>
                        <td>
                        <table class="p2" cellspacing="1" bordercolordark="#666666" cellpadding="1" width="100%" bordercolorlight="#666666" border="1">
                            <tbody>
                                <tr>
                                    <td width="409">var deadline= new Date(&quot;7/30/2000&quot;);<br /></td>
                                    <td width="351">定义&ldquo;到期&rdquo;变量。你可以随便设置。</td>
                                </tr>
                                <tr>
                                    <td width="409" bgcolor="#cfdfff">var symbol=&quot;7月30日&quot;; <br /></td>
                                    <td width="351" bgcolor="#cfdfff">定义&ldquo;日期性质&rdquo;变量，可以随便设置。</td>
                                </tr>
                                <tr>
                                    <td width="409">var now = new Date(); <br /></td>
                                    <td width="351">设置&ldquo;现在&rdquo;的时间。</td>
                                </tr>
                                <tr>
                                    <td width="409" bgcolor="#cfdfff">var leave =deadline.getTime() - now.getTime();<br /></td>
                                    <td width="351" bgcolor="#cfdfff">设置变量&ldquo;leave&rdquo;的值为到期时间减现在时间，返回的为毫秒数。</td>
                                </tr>
                                <tr>
                                    <td width="409">var day = Math.floor(leave / (1000 * 60 * 60 * 24));<br />;</td>
                                    <td width="351">将毫秒数化为天数，并返回一个不大于天数的整数。</td>
                                </tr>
                                <tr bgcolor="#cfdfff">
                                    <td width="409">if (day &gt; 0) <br />document.write(&quot;今天离&quot;+ symbol+&quot;还有&quot;+day +&quot;天&quot;)<br />)</td>
                                    <td width="351">如果日期不是今天到期，就输出&ldquo;还有多少天&rdquo;。</td>
                                </tr>
                                <tr>
                                    <td width="409">else if (day == 0)<br />document.write(&quot;只有1天啦！&quot;)<br /></td>
                                    <td width="351">如果到期日就是机器今天的系统日期，则输出&ldquo;只有一天了&rdquo;。</td>
                                </tr>
                                <tr bgcolor="#cfdfff">
                                    <td width="409">else<br />document.write(&quot;唉呀！已经过了！&quot;)</td>
                                    <td width="351">否则，就是过期了。</td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            <br /><br /></td>
            <td class="p2" width="18">&nbsp;</td>
            <td class="p2" width="1" bgcolor="#a8a8ab"><img height="1" alt="" src="http://www.tkpao.com/img/blank.gif" width="1" /></td>
            <td class="p2" width="48">&nbsp;</td>
        </tr>
    </tbody>
</table>]]></description>
		</item>
		
			<item>
			<link>http://www.tkpao.com/article.asp?id=103</link>
			<title><![CDATA[JavaScript实例:导航条式菜单]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Thu,20 Sep 2007 15:59:03 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=103</guid>
		<description><![CDATA[<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td class="p3" align="center" width="711"><b>　　　　导 航 条 式 菜 单</b></td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">效 果 演 示</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" align="left">
            <div class="child" id="KB3Child">
            <form>
                <p>　　　　 </p>
                <p>　　　　 <select style="COLOR: rgb(0,0,128); BACKGROUND-COLOR: #d9dcff" onchange="javascript:window.open(this.options[this.selectedIndex].value)" size="1" name="select1">
                <option selected="selected">--搜索引擎--</option>
                <option value="http://www.hongen.com">洪恩在线</option>
                <option value="http://www.sina.com.cn">新浪网</option>
                <option value="http://www.teacher.edu.cn">中国园丁网</option>
                </select> </p>
            </form>
            </div>
            </td>
        </tr>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr>
                        <td height="30">&nbsp;</td>
                    </tr>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源代码如下</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457"><b><br /><br /></b><span class="p1"><font color="#6633ff"></font></span><b><br /></b>
            <form>
                <p><span class="p1"><font color="#6633ff">这段程序放在&lt;body&gt;与&lt;/body&gt;之间</font></span></p>
                <p><textarea onmouseover="this.focus()" style="BACKGROUND-COLOR: #d5e9fd" onfocus="this.select()" rows="10" cols="50" name="textarea">&lt;form&gt;
                div align=&quot;center&quot;&gt;
                &lt;select name=&quot;select1&quot; size=&quot;1&quot;
                onChange=&quot;javascript:window.open(this.options[this.selectedIndex].value)&quot;
                style=&quot;BACKGROUND-COLOR: #d9dcff; COLOR: rgb(0,0,128); &quot;&gt;
                &lt;option selected&gt;--搜索引擎--&lt;/option&gt;
                &lt;option value=&quot;http://www.hongen.com&quot;&gt;洪恩在线&lt;/option&gt;
                &lt;option value=&quot;http://www.sina.com.cn&quot;&gt;新浪网&lt;/option&gt;
                &lt;option value=&quot;http://www.teacher.edu.cn&quot;&gt;中国园丁网&lt;/option&gt;
                &lt;/select&gt;
                &lt;/div&gt;
                &lt;/form&gt;</textarea> </p>
                <p>&nbsp; </p>
            </form>
            <b><br /></b></td>
        </tr>
        <tr>
            <td valign="bottom" align="center">
            <table cellspacing="0" cellpadding="0" width="238" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源程序讲解：</font></b></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457">&nbsp;</td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td class="p2" align="right" width="693"><br />
            <table cellspacing="0" cellpadding="0" width="650" border="0">
                <tbody>
                    <tr>
                        <td>
                        <table class="p2" cellspacing="1" bordercolordark="#666666" cellpadding="1" width="100%" bordercolorlight="#666666" border="1">
                            <tbody>
                                <tr>
                                    <td width="317">onChange=&quot;javascript:window.open<br />(this.options[this.selectedIndex].value)&quot; <br />style=&quot;BACKGROUND-COLOR: #d9dcff; COLOR: rgb(0,0,128); </td>
                                    <td width="423">当选项有变化时，执行当前选项的值，同时设定背景色，字体颜色。</td>
                                </tr>
                                <tr>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            <br /><br /></td>
        </tr>
    </tbody>
</table>]]></description>
		</item>
		
			<item>
			<link>http://www.tkpao.com/article.asp?id=102</link>
			<title><![CDATA[JavaScript实例:日期星期的显示]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Thu,20 Sep 2007 15:44:11 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=102</guid>
		<description><![CDATA[<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td class="p3" align="center" width="711"><b>　　　　　日期星期的显示</b></td>
            <td width="1" bgcolor="#a8a8ab"><img height="1" alt="" src="http://www.tkpao.com/img/blank.gif" width="1" /></td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">效 果 演 示</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td>
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr>
                        <td align="center" width="34" height="172"><font color="#ff0000"></font></td>
                        <td align="center" width="255" background="img/date.jpg" height="172"><font color="#0000ff">
                        <script language="JavaScript" type="text/javascript">
                        <!--
                        todayDate = new Date();
                        date = todayDate.getDate();
                        month= todayDate.getMonth() +1;
                        year= todayDate.getYear();
                        document.write("今天是")
                        document.write("<br>")
                        if(navigator.appName == "Netscape")
                        {
                        document.write(1900+year);
                        document.write("年");
                        document.write(month);
                        document.write("月");
                        document.write(date);
                        document.write("日");
                        document.write("<br>")
                        }
                        if(navigator.appVersion.indexOf("MSIE") != -1)
                        {
                        document.write(year);
                        document.write("年");
                        document.write(month);
                        document.write("月");
                        document.write(date);
                        document.write("日");
                        document.write("<br>")
                        }
                        if (todayDate.getDay() == 5) document.write("星期五")
                        if (todayDate.getDay() == 6) document.write("星期六")
                        if (todayDate.getDay() == 0) document.write("星期日")
                        if (todayDate.getDay() == 1) document.write("星期一")
                        if (todayDate.getDay() == 2) document.write("星期二")
                        if (todayDate.getDay() == 3) document.write("星期三")
                        if (todayDate.getDay() == 4) document.write("星期四")
                        //-->
                        </script>
                        今天是<br />2007年9月20日<br />星期四 今天是<br />2007年9月20日<br />星期四 </font></td>
                        <td width="1">&nbsp;</td>
                    </tr>
                </tbody>
            </table>
            <br /></td>
        </tr>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr>
                        <td height="30">&nbsp;</td>
                    </tr>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源代码如下</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457"><b><br /><br /></b><span class="p1"><font color="#6633ff"><br />这段程序放在&lt;body&gt;与&lt;/body&gt;之间</font></span><br />
            <form>
                <textarea onmouseover="this.focus()" style="BACKGROUND-COLOR: #d5e9fd" onfocus="this.select()" rows="12" cols="50" name="textarea">&lt;!--
                todayDate = new Date();
                date = todayDate.getDate();
                month= todayDate.getMonth() +1;
                year= todayDate.getYear();
                document.write(&quot;今天是&quot;)
                document.write(&quot;&lt;br&gt;&quot;)
                if(navigator.appName == &quot;Netscape&quot;)
                {
                document.write(1900+year);
                document.write(&quot;年&quot;);
                document.write(month);
                document.write(&quot;月&quot;);
                document.write(date);
                document.write(&quot;日&quot;);
                document.write(&quot;&lt;br&gt;&quot;)
                }
                if(navigator.appVersion.indexOf(&quot;MSIE&quot;) != -1)
                {
                document.write(year);
                document.write(&quot;年&quot;);
                document.write(month);
                document.write(&quot;月&quot;);
                document.write(date);
                document.write(&quot;日&quot;);
                document.write(&quot;&lt;br&gt;&quot;)
                }
                if (todayDate.getDay() == 5) document.write(&quot;星期五&quot;)
                if (todayDate.getDay() == 6) document.write(&quot;星期六&quot;)
                if (todayDate.getDay() == 0) document.write(&quot;星期日&quot;)
                if (todayDate.getDay() == 1) document.write(&quot;星期一&quot;)
                if (todayDate.getDay() == 2) document.write(&quot;星期二&quot;)
                if (todayDate.getDay() == 3) document.write(&quot;星期三&quot;)
                if (todayDate.getDay() == 4) document.write(&quot;星期四&quot;)
                //--&gt; </textarea>
            </form>
            <br /></td>
        </tr>
        <tr>
            <td valign="bottom" align="center">
            <table cellspacing="0" cellpadding="0" width="238" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0" class="p2">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源程序讲解：</font></b></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457">&nbsp;</td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0" class="p2">
    <tbody>
        <tr>
            <td class="p2" align="right" width="693"><br />
            <table cellspacing="0" cellpadding="0" width="650" border="0">
                <tbody>
                    <tr>
                        <td>
                        <table class="p2" cellspacing="1" bordercolordark="#666666" cellpadding="1" width="100%" bordercolorlight="#666666" border="1">
                            <tbody>
                                <tr>
                                    <td width="270">todayDate = new Date();<br /></td>
                                    <td width="490">当定义一个新的对象时，通常使用&ldquo;new&rdquo;操作符。在这里，就是创建了日期对象。</td>
                                </tr>
                                <tr>
                                    <td width="270" bgcolor="#cfdfff">date = todayDate.getDate();<br /><br /></td>
                                    <td width="490" bgcolor="#cfdfff">getDate()是Date对象的一种方法，其功能是获得当前的日期。</td>
                                </tr>
                                <tr>
                                    <td width="270">month= todayDate.getMonth() + 1 ;<br />; </td>
                                    <td width="490">getMonth()是Date对象的一种方法，其功能是获得当前的日期，由于月份是从0开始的，所以这里要&ldquo;+1&rdquo;。</td>
                                </tr>
                                <tr>
                                    <td width="270" bgcolor="#cfdfff">year= todayDate.getYear()</td>
                                    <td width="490" bgcolor="#cfdfff">getYear()是Date对象的一种方法，其功能是获得当前的年份。</td>
                                </tr>
                                <tr>
                                    <td width="270">document.write(&quot;今天是&quot;) document.write(&quot;&lt;br&gt;&quot;)</td>
                                    <td width="490">输出&ldquo;今天是&rdquo;</td>
                                </tr>
                                <tr>
                                    <td width="270" bgcolor="#cfdfff">if(navigator.appName == &quot;Netscape&quot;) { document.write(1900+year); document.write(&quot;年&quot;); document.write(month); document.write(&quot;月&quot;); document.write(date); document.write(&quot;日&quot;);<br />document.write(&quot;&lt;br&gt; &quot;) } </td>
                                    <td width="490" bgcolor="#cfdfff">如果浏览器是Netscape，输出今天是&ldquo;year&rdquo;+&ldquo;年&rdquo;+&ldquo;month&rdquo;+&ldquo;月&rdquo;+&ldquo;date&rdquo;+&ldquo;日&rdquo;，其中年要加1900。</td>
                                </tr>
                                <tr>
                                    <td width="270">if(navigator.appVersion.indexOf(&quot;MSIE&quot;) != -1) { document.write(year); document.write(&quot;年&quot;); document.write(month); document.write(&quot;月&quot;); document.write(date); document.write(&quot;日&quot;);<br />document.write(&quot;&lt;br&gt; &quot;) }</td>
                                    <td width="490">如果浏览器是IE，直接输出今天是&ldquo;year&rdquo;+&ldquo;年&rdquo;+&ldquo;month&rdquo;+&ldquo;月&rdquo;+&ldquo;date&rdquo;+&ldquo;日&rdquo;。</td>
                                </tr>
                                <tr>
                                    <td width="270" bgcolor="#cfdfff">document.write(&quot;&quot;) ；</td>
                                    <td width="490" bgcolor="#cfdfff">在&ldquo;日期&rdquo;与&ldquo;星期&rdquo;之间输入一个空格。</td>
                                </tr>
                                <tr>
                                    <td width="270">if (todayDate.getDay() == 5) document.write(&quot;星期五&quot;)；<br />if (todayDate.getDay() == 6) document.write(&quot;星期六&quot;)；<br />if (todayDate.getDay() == 0) document.write(&quot;星期日&quot;)；<br />if (todayDate.getDay() == 1) document.write(&quot;星期一&quot;)；<br />if (todayDate.getDay() == 2) document.write(&quot;星期二&quot;)；<br />if (todayDate.getDay() == 3) document.write(&quot;星期三&quot;)；<br />if (todayDate.getDay() == 4) document.write(&quot;星期四&quot;)</td>
                                    <td width="490">getDay()是Date对象的一种方法，其功能是获得当前是星期几。document.write输出今天是&ldquo;星期几&rdquo;。</td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            <br /><br /></td>
            <td class="p2" width="1" bgcolor="#a8a8ab"><img height="1" alt="" src="http://www.tkpao.com/img/blank.gif" width="1" /></td>
        </tr>
    </tbody>
</table>]]></description>
		</item>
		
			<item>
			<link>http://www.tkpao.com/article.asp?id=101</link>
			<title><![CDATA[JavaScript实例:显示最后修改日期]]></title>
			<author>tkpao@163.com(tkpao)</author>
			<category><![CDATA[JavaScript]]></category>
			<pubDate>Thu,20 Sep 2007 14:56:17 +0800</pubDate>
			<guid>http://www.tkpao.com/default.asp?id=101</guid>
		<description><![CDATA[<script language="Javascript" src="/pub/js/head.js" type="text/javascript"></script>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td class="p3" align="center" width="711"><b>　　　　　显示最后修改日期</b></td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">效 果 演 示</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td>
            <p>
            <script language="JavaScript" type="text/javascript">
            <!--hide script from old browsers
            function modified(){
            document.form1.textfield.value= document.lastModified}
            // end hiding -->
            </script>
            </p>
            <form name="form1">
                上次修改日期： <input name="textfield" value="09/20/2007 14:53:43" />
            </form>
            <br /></td>
        </tr>
        <tr>
            <td valign="top" align="center">
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <tbody>
                    <tr>
                        <td height="30">&nbsp;</td>
                    </tr>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源代码如下</font></b><font color="#ffffff">：</font></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457"><b><br /><br /></b><span class="p1"><font color="#6633ff"><br />这段程序放在&lt;body&gt;与&lt;/body&gt;之间</font></span><b><br /></b>
            <form>
                <p><textarea onmouseover="this.focus()" style="BACKGROUND-COLOR: #d5e9fd" onfocus="this.select()" rows="10" cols="50" name="textarea">&lt;script language=&quot;JavaScript&quot;&gt;
                &lt;!--hide script from old browsers
                function modified(){
                document.form1.textfield.value= document.lastModified}
                // end hiding --&gt;
                &lt;/script&gt;
                &lt;form name=&quot;form1&quot; &gt;
                上次修改日期：
                &lt;input type=&quot;text&quot; name=&quot;textfield&quot;&gt;
                &lt;/form&gt;</textarea> </p>
                <p><span class="p1"><font color="#6633ff">这段程序放在&lt;body ****&gt;正文中</font></span></p>
                <p><textarea onmouseover="this.focus()" style="BACKGROUND-COLOR: #d5e9fd" onfocus="this.select()" cols="50" name="area">onload=modified()</textarea> </p>
            </form>
            <br /></td>
        </tr>
        <tr>
            <td valign="bottom" align="center">
            <table cellspacing="0" cellpadding="0" width="238" border="0">
                <tbody>
                    <tr align="center">
                        <td>
                        <table cellspacing="0" cellpadding="0" width="110" border="0">
                            <tbody>
                                <tr align="center" bgcolor="#5f74bf">
                                    <td class="p1" align="right"><b><font color="#ffffff">源程序讲解：</font></b></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </td>
            <td class="p2" valign="top" width="457">&nbsp;</td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" border="0">
    <tbody>
        <tr>
            <td class="p2" align="right" width="693"><br />
            <table cellspacing="0" cellpadding="0" width="650" border="0">
                <tbody>
                    <tr>
                        <td>
                        <table class="p2" cellspacing="1" bordercolordark="#666666" cellpadding="1" width="100%" bordercolorlight="#666666" border="1">
                            <tbody>
                                <tr>
                                    <td width="316">
                                    <p>hide script from old browsers </p>
                                    </td>
                                    <td width="621">有些低版本的浏览器不支持javascript,写上这句代码，在低版本的浏览器中，javascript可被忽略。</td>
                                </tr>
                                <tr bgcolor="#cfdfff">
                                    <td width="316">function modified(){ </td>
                                    <td width="621">用function语句定义一个函数以及它的参数。</td>
                                </tr>
                                <tr>
                                    <td width="316">document.form1.textfield.value= document.lastModified}</td>
                                    <td width="621">
                                    <p>lastmodified是document对象的一个属性，可以自己输出上次修改该文件的时间。<br />这句代码意思是把上次修改时间输出到名字为textfield的文本框中。 </p>
                                    </td>
                                </tr>
                                <tr bgcolor="#cfdfff">
                                    <td width="316">form name=&quot;form1&quot;<br />input type=&quot;text&quot; name=&quot;textfield&quot;</td>
                                    <td width="621">在页面中建立一个文本框，名字要为textfield。</td>
                                </tr>
                                <tr>
                                    <td width="316">onload=modified()</td>
                                    <td width="621">页面装载时，调用modified函数。</td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            <p align="left"><br />最简单的一段显示最后修改日期的代码：</p>
            <p align="left">&lt;script language=&quot;JavaScript&quot;&gt;<br />document.write(&quot; 最后更新时间：&quot;+document.lastModified); <br />&lt;/script&gt; <br /></p>
            </td>
        </tr>
    </tbody>
</table>
<p>&nbsp;</p>]]></description>
		</item>
		
</channel>
</rss>
