<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>云淡风轻</title>
	<atom:link href="http://www.zhangyajun.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zhangyajun.com</link>
	<description>云淡风轻近午天，傍花随柳过前川。时人不识余心乐，将谓偷闲学少年。</description>
	<lastBuildDate>Thu, 24 Sep 2009 07:24:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JavaScript获取页面对象的ID和Name</title>
		<link>http://www.zhangyajun.com/153.html</link>
		<comments>http://www.zhangyajun.com/153.html#comments</comments>
		<pubDate>Thu, 24 Sep 2009 07:20:47 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=153</guid>
		<description><![CDATA[这两个JavaScript函数用来获取页面对象的getElementByID、getElementsByName，代码和用法如下：

function $id( id ){
return document.getElementById( id );
}

function $name( name ){
return document.getElementsByName( name );
}

$id(&#34... ]]></description>
			<content:encoded><![CDATA[<p>这两个JavaScript函数用来获取页面对象的getElementByID、getElementsByName，代码和用法如下：</p>
<pre class="brush: javascript;">
function $id( id ){
return document.getElementById( id );
}

function $name( name ){
return document.getElementsByName( name );
}

$id(&quot;test1&quot;).innerHTML = &quot;ABC&quot;; //更新ID为test1的对象的内容
$name(&quot;test2&quot;).value = &quot;ABC&quot;; //设置NAME为text2的对象的值
</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/153.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript操作cookies保存、获取和删除</title>
		<link>http://www.zhangyajun.com/145.html</link>
		<comments>http://www.zhangyajun.com/145.html#comments</comments>
		<pubDate>Thu, 24 Sep 2009 06:23:39 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[cookies]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=145</guid>
		<description><![CDATA[
/*
功能：保存cookies函数
参数：name，cookie名字；value，值
*/
function SetCookie(name,value){
var Days = 60; //cookie 将被保存两个月
var exp = new Date(); //获得当前时间
exp.setTime(exp.getTime() + Days*24*60*60*1000); //换... ]]></description>
			<content:encoded><![CDATA[<pre class="brush: javascript;">
/*
功能：保存cookies函数
参数：name，cookie名字；value，值
*/
function SetCookie(name,value){
var Days = 60; //cookie 将被保存两个月
var exp = new Date(); //获得当前时间
exp.setTime(exp.getTime() + Days*24*60*60*1000); //换成毫秒
document.cookie = name + &quot;=&quot;+ escape (value) + &quot;;expires=&quot; + exp.toGMTString();
 }
</pre>
<pre class="brush: javascript;">
/*
功能：获取cookies函数
参数：name，cookie名字
*/
function getCookie(name){
var arr = document.cookie.match(new RegExp(&quot;(^| )&quot;+name+&quot;=([^;]*)(;|$)&quot;));
if(arr != null)
return unescape(arr[2]);
return null;
}
</pre>
<pre class="brush: javascript;">
/*
功能：删除cookies函数
参数：name，cookie名字
*/
function delCookie(name){
var exp = new Date(); //当前时间
exp.setTime(exp.getTime() - 1);
var cval=getCookie(name);
if(cval!=null) document.cookie= name + &quot;=&quot;+cval+&quot;;expires=&quot;+exp.toGMTString();
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/145.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript前进后退按钮</title>
		<link>http://www.zhangyajun.com/143.html</link>
		<comments>http://www.zhangyajun.com/143.html#comments</comments>
		<pubDate>Sat, 05 Sep 2009 07:23:29 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=143</guid>
		<description><![CDATA[

&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd&#34;&#62;
&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62;
&#60;head&#62;
&#60;meta http-equiv=&#34;Cont... ]]></description>
			<content:encoded><![CDATA[<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_cnUGqj">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;JavaScript前进后退按钮&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function goHist(a)
{
	history.go(a);
}
&lt;/script&gt;
&lt;form METHOD=&quot;post&quot;&gt;
&lt;p&gt;
&lt;input TYPE=&quot;button&quot; VALUE=&quot;前进&quot; onClick=&quot;goHist(1)&quot;&gt;
&lt;input TYPE=&quot;button&quot; VALUE=&quot;后退&quot; onClick=&quot;goHist(-1)&quot;&gt;
&lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_cnUGqj');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_cnUGqj');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/143.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript显示系统时间</title>
		<link>http://www.zhangyajun.com/134.html</link>
		<comments>http://www.zhangyajun.com/134.html#comments</comments>
		<pubDate>Mon, 31 Aug 2009 00:44:48 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=134</guid>
		<description><![CDATA[JavaScript显示系统时间,显示年月日时分秒和星期，每秒自动刷新，并加入日期颜色区别:

星期一至星期五显示为黑色
星期六显示为绿色
星期日显示为红色



&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML... ]]></description>
			<content:encoded><![CDATA[<p>JavaScript显示系统时间,显示年月日时分秒和星期，每秒自动刷新，并加入日期颜色区别:</p>
<ul>
<li>星期一至星期五显示为黑色</li>
<li>星期六显示为绿色</li>
<li>星期日显示为红色</li>
</ul>
<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_5Fkt3K">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;JavaScript 时间显示&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;span id=localtime&gt;&lt;/span&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function showLocale(objD)
{
	var str,colorhead,colorfoot;
	var yy = objD.getYear();
	if(yy&lt;1900) yy = yy+1900;
	var MM = objD.getMonth()+1;
	if(MM&lt;10) MM = '0' + MM;
	var dd = objD.getDate();
	if(dd&lt;10) dd = '0' + dd;
	var hh = objD.getHours();
	if(hh&lt;10) hh = '0' + hh;
	var mm = objD.getMinutes();
	if(mm&lt;10) mm = '0' + mm;
	var ss = objD.getSeconds();
	if(ss&lt;10) ss = '0' + ss;
	var ww = objD.getDay();
	if  ( ww==0 )  colorhead=&quot;&lt;font color=\&quot;#FF0000\&quot;&gt;&quot;;
	if  ( ww &gt; 0 &amp;&amp; ww &lt; 6 )  colorhead=&quot;&lt;font color=\&quot;#373737\&quot;&gt;&quot;;
	if  ( ww==6 )  colorhead=&quot;&lt;font color=\&quot;#008000\&quot;&gt;&quot;;
	if  (ww==0)  ww=&quot;星期日&quot;;
	if  (ww==1)  ww=&quot;星期一&quot;;
	if  (ww==2)  ww=&quot;星期二&quot;;
	if  (ww==3)  ww=&quot;星期三&quot;;
	if  (ww==4)  ww=&quot;星期四&quot;;
	if  (ww==5)  ww=&quot;星期五&quot;;
	if  (ww==6)  ww=&quot;星期六&quot;;
	colorfoot=&quot;&lt;/font&gt;&quot;
	str = colorhead + yy + &quot;-&quot; + MM + &quot;-&quot; + dd + &quot; &quot; + hh + &quot;:&quot; + mm + &quot;:&quot; + ss + &quot;  &quot; + ww + colorfoot;
	return(str);
}
function tick()
{
	var today;
	today = new Date();
	document.getElementById(&quot;localtime&quot;).innerHTML = showLocale(today);
	window.setTimeout(&quot;tick()&quot;, 1000);
}
tick();
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_5Fkt3K');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_5Fkt3K');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/134.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JavaScript随机选择数组元素</title>
		<link>http://www.zhangyajun.com/131.html</link>
		<comments>http://www.zhangyajun.com/131.html#comments</comments>
		<pubDate>Mon, 31 Aug 2009 00:37:25 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=131</guid>
		<description><![CDATA[

&#60;script type=&#34;text/javascript&#34;&#62;
var Arr = [&#34;a&#34;,&#34;b&#34;,&#34;c&#34;,&#34;d&#34;];
var i = Math.floor(Math.random() * Arr.length + 1)-1;
alert(Arr[i]);
&#60;/script&#62;

  提示：你可以先修改部分代码再运行。
... ]]></description>
			<content:encoded><![CDATA[<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_qXRC0L">
&lt;script type=&quot;text/javascript&quot;&gt;
var Arr = [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;];
var i = Math.floor(Math.random() * Arr.length + 1)-1;
alert(Arr[i]);
&lt;/script&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_qXRC0L');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_qXRC0L');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/131.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SyntaxHighlighter 代码高亮显示工具安装成功</title>
		<link>http://www.zhangyajun.com/6.html</link>
		<comments>http://www.zhangyajun.com/6.html#comments</comments>
		<pubDate>Fri, 28 Aug 2009 16:48:12 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[SyntaxHighlighter]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=6</guid>
		<description><![CDATA[SyntaxHighlighter是一款用JavaScript编写的功能强大的代码高亮显示工具，它可以在网页中对各种程序源代码语法进行高亮显示。当前最新版本是2.0.296，目前支持的编程语言为：Bash/shell、C#、C++、CSS... ]]></description>
			<content:encoded><![CDATA[<p>SyntaxHighlighter是一款用JavaScript编写的功能强大的代码高亮显示工具，它可以在网页中对各种程序源代码语法进行高亮显示。当前最新版本是2.0.296，目前支持的编程语言为：Bash/shell、C#、C++、CSS、Delphi、Diff、Groovy、JavaScript、Java、Perl、PHP、Plain Text、Python、Ruby、Scala、SQL、Visual Basic、XML/XHTML/XSLT/HTML。</p>
<p>演示地址：<a title="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo">http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo</a></p>
<p>下载地址：<a title="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Download" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Download">http://alexgorbatchev.com/wiki/SyntaxHighlighter:Download</a></p>
<p>安装方法：</p>
<ol>
<li>下载SyntaxHighlighter并解压缩，将解压缩后的文件夹syntaxhighlighter_2.0.296重命名为SyntaxHighlighter，SyntaxHighlighter文件夹下应该三个文件夹，分别是src、scripts、styles，另外还有一个test.html和LGPLv3.txt，然后将SyntaxHighlighter文件夹复制到上传到网站根目录。</li>
<li>在网页的&lt;head&gt;&lt;/head&gt;之间插入以下代码：
<pre class="brush: html">
&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/SyntaxHighlighter/styles/shCore.css&quot;/&gt;
&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/SyntaxHighlighter/styles/shThemeDefault.css&quot;/&gt;</pre>
<p>其实就是载入两个CSS文件，其中第二行载入的shThemeDefault.css是默认的样式，在SyntaxHighlighter目录的styles目录中一共提供了6个样式文件，分别是<a title="shThemeDefault.css" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes:Default">shThemeDefault.css</a>、<a title="shThemeDjango.css" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes:Django">shThemeDjango.css</a>、<a title="shThemeEmacs.css" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes:Emacs">shThemeEmacs.css</a>、<a title="shThemeFadeToGrey.css" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes:FadeToGrey">shThemeFadeToGrey.css</a>、<a title="shThemeMidnight.css" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes:Midnight">shThemeMidnight.css</a>、<a title="shThemeRDark.css" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes:RDark">shThemeRDark.css</a>，可以根据自己喜欢的样式来载入不同的样式文件。</p>
</li>
<li>在&lt;/body&gt;的前面插入以下代码
<pre class="brush: html">
&lt;script src=&quot;/SyntaxHighlighter/scripts/shCore.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushBash.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushCpp.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushCSharp.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushCss.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushDelphi.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushDiff.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushGroovy.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushJava.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushJScript.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushPerl.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushPhp.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushPlain.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushPython.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushRuby.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushScala.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushSql.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushVb.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/SyntaxHighlighter/scripts/shBrushXml.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	SyntaxHighlighter.config.clipboardSwf = '/SyntaxHighlighter/scripts/clipboard.swf';
	SyntaxHighlighter.all();
&lt;/script&gt;</pre>
<p>在以上代码载入的19个js文件中，除了第一个shCore.js外，其他的都是每个js文件对应一种编程语言(根据文件名可以判断支持哪种编程语言)，可以根据实际需要来选择是否载入。</p>
</li>
<li>将需要进行高亮显示的源代码放在&lt;pre&gt;&lt;/pre&gt;之间，例如：
<pre class="brush: c-sharp;">
&lt;pre class=&quot;brush: c-sharp;&quot;&gt;
function test() : String
{
	return 10;
}
&lt;/pre&gt;</pre>
<p>其中<span style="color: rgb(255, 0, 0);">c-sharp</span>是定义编程语言的类型，关于其他类型编程语言的定义方法，详见下表的Brush aliases列：</p>
<table cellspacing="0" cellpadding="0" border="0" style="width: 500px;">
<tbody>
<tr style="background-color: rgb(238, 238, 238);">
<th style="width: 150px;">Brush name</th>
<th style="width: 200px;">Brush aliases</th>
<th style="width: 150px;">File name</th>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>Bash/shell</td>
<td>bash, shell</td>
<td>shBrushBash.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>C#</td>
<td>c-sharp, csharp</td>
<td>shBrushCSharp.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>C++</td>
<td>cpp, c</td>
<td>shBrushCpp.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>CSS</td>
<td>css</td>
<td>shBrushCss.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>Delphi</td>
<td>delphi, pas, pascal</td>
<td>shBrushDelphi.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>Diff</td>
<td>diff, patch</td>
<td>shBrushDiff.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>Groovy</td>
<td>groovy</td>
<td>shBrushGroovy.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>JavaScript</td>
<td>js, jscript, javascript</td>
<td>shBrushJScript.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>Java</td>
<td>java</td>
<td>shBrushJava.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>Perl</td>
<td>perl, pl</td>
<td>shBrushPerl.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>PHP</td>
<td>php</td>
<td>shBrushPhp.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>Plain Text</td>
<td>plain, text</td>
<td>shBrushPlain.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>Python</td>
<td>py, python</td>
<td>shBrushPython.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>Ruby</td>
<td>rails, ror, ruby</td>
<td>shBrushRuby.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>Scala</td>
<td>scala</td>
<td>shBrushScala.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>SQL</td>
<td>sql</td>
<td>shBrushSql.js</td>
</tr>
<tr style="background-color: rgb(255, 255, 255);">
<td>Visual Basic</td>
<td>vb, vbnet</td>
<td>shBrushVb.js</td>
</tr>
<tr style="background-color: rgb(248, 248, 248);">
<td>XML</td>
<td>xml, xhtml, xslt, html, xhtml</td>
<td>shBrushXml.js</td>
</tr>
</tbody>
</table>
</li>
<li>保存，刷新，看看效果吧。
<p>以下是HTML代码显示效果：</p>
<pre class="brush: xml">
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;SyntaxHighlighter&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>以下是PHP代码显示效果：</p>
<pre class="brush: php">
$today = date(&quot;F j, Y, g:i a&quot;);
$today = date(&quot;m.d.y&quot;);
$today = date(&quot;j, n, Y&quot;);
$today = date(&quot;Ymd&quot;);
$today = date('h-i-s, j-m-y, it is w Day z ');
$today = date('\i\t \i\s \t\h\e jS \d\a\y.');
$today = date(&quot;D M j G:i:s T Y&quot;);
$today = date('H:m:s \m \i\s\ \m\o\n\t\h');
$today = date(&quot;H:i:s&quot;);</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/6.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Theme 采用 XHTML 1.0 Strict 标准构建</title>
		<link>http://www.zhangyajun.com/3.html</link>
		<comments>http://www.zhangyajun.com/3.html#comments</comments>
		<pubDate>Fri, 28 Aug 2009 02:46:17 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[其他]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=3</guid>
		<description><![CDATA[由于这个Theme开始写的时间就是以XHTML 1.0 Transitional写的，现在要更改为XHTML 1.0 Strict，相对来讲，不是太复杂。 经过简单的调试、修改，本站的THeme已完全达到 XHTML 1.0 Strict 的标准，并已经通过W... ]]></description>
			<content:encoded><![CDATA[<p>由于这个Theme开始写的时间就是以XHTML 1.0 Transitional写的，现在要更改为XHTML 1.0 Strict，相对来讲，不是太复杂。 经过简单的调试、修改，本站的THeme已完全达到 XHTML 1.0 Strict 的标准，并已经通过W3C的检查（点击页面最下面的W3C检查图标即可查看）。</p>
<p>在修改过程中，遇到以下三个问题：</p>
<p>1、XHTML 1.0 Strict 不支持a标签的target属性，也就是无法强制在新窗口打开网页。经过查找资料显示，W3C一直不提倡使用target这个属性，W3C认为是否在新窗口打开链接应该由用户去选择，而不是强制用户在新窗口里打开，这样很容易就导致一下子开太多的窗口，造成浏览器占用过多的系统资源。</p>
<p>解决办法：以对用户的尊重和遵循W3C标准为目的，放弃使用target属性，如果你想在新窗口打开的话，只能右击鼠标了。</p>
<p>2、XHTML 1.0 Strict 不支持img标签的border属性。</p>
<p>解决办法：在CSS里控制就可以了，如果你要网页上所有图片的边框为0的话，在CSS里加上如下代码（红色部分）：<span style="color: rgb(255, 0, 0);">img{ border:0;}</span></p>
<p>3、XHTML 1.0 Strict 不支持script标签的language属性。</p>
<p>解决办法：将&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;改为&lt;script type=&quot;text/javascript&quot;&gt;，就是将language=&quot;javascript&quot;去掉即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/3.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello world！</title>
		<link>http://www.zhangyajun.com/1.html</link>
		<comments>http://www.zhangyajun.com/1.html#comments</comments>
		<pubDate>Thu, 27 Aug 2009 20:23:30 +0000</pubDate>
		<dc:creator>云淡风轻</dc:creator>
				<category><![CDATA[其他]]></category>

		<guid isPermaLink="false">http://www.zhangyajun.com/?p=1</guid>
		<description><![CDATA[欢迎使用 WordPress 。这是系统自动生成的演示文章。编辑或者删除它，开始您的博客！... ]]></description>
			<content:encoded><![CDATA[<p>欢迎使用 WordPress 。这是系统自动生成的演示文章。编辑或者删除它，开始您的博客！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangyajun.com/1.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
