<?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.xiaoxiaozi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xiaoxiaozi.com</link>
	<description>Say you say me ,say we together~~</description>
	<lastBuildDate>Thu, 05 Apr 2012 11:02:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>清明小记</title>
		<link>http://www.xiaoxiaozi.com/2012/04/05/2291/</link>
		<comments>http://www.xiaoxiaozi.com/2012/04/05/2291/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 10:04:23 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Myself]]></category>
		<category><![CDATA[小小子]]></category>
		<category><![CDATA[闲聊]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2291</guid>
		<description><![CDATA[嗓子痛的难受，加上要去取婚纱照，丫头一个人肯定是拎不了的。请了一天假，坐车时看到————花儿都开好了。

京城的天气忽冷忽热，有时对你热情似火，有时兜头就是一盆冷水。在反复的将羊毛裤穿起、脱下的过程中，鼻子里的水也一滴一滴的淌下。

默默的养病，到家就看会儿电视，直到嗑睡的不行。其实要想应对感冒，还是喝开水好的最快。于是，我好了，丫头病了,清明节也到了。

<!--more-->

丫头病的比我要严重的多，喉咙和冒火假的，躺着躺着就会头痛，痛着痛着就会哭。由于周日晚上有周会，拒接几个电话的后果还是很严重的，某人直接关了手机。

老婆还是坚强的，带病陪我去吃了火锅。小肥羊的火锅贵是贵了些，不过貌似还挺对症，吃完后感觉舒服多了。 :)

假期总是让人又爱又恨：没来的时候，经常幻想本周看多少书，翻多少资料，知识水平瞬间升华多少！ 真正的假期其实是这样度过的，第一天游戏+超市，第二天外卖+电影，第三天逛街+电影+感叹假期就这样蹓走了。

话说玩网络游戏再也没有当年的激情，玩着玩着有人要当我师傅，第一句话就是“有时间经常在线吗？” 无语，让这位滚蛋了。时间是有的，在线是不可能的。于是玩了一天半，游戏就扔在一边了。接着开始怀念传奇，我们的传奇————私服。

吃了药总是特别的困，丫头在凌晨1：00的时候爬床上睡觉去了。我呢却想找点刺激，毕竟还有一天就又要上班了。看了一遍《绣花鞋》，听着不太吓人的音效，回味当时蒙被子里听张震讲的鬼故事。于是，索然无味中，在2：30我也上去呼猪头了。

三天的假期总是一晃而过，虽然多了一天，但是还是恨。去了趟传说中的梨园狗市，喜欢上一个小猫，我都想忽略自己姓于这件事，来掏几张毛爷爷来弄个好好照顾。结果老板无情的一句“3800”让我从理想返回了现实。

话说狗市里的狗都有些无精打彩，而且买回去后还要弄“户口”，人还没有北京户口但是不妨碍给狗先办一个。毕竟这是一个狗日的社会。

今天上班，果然缺了好多人，毕竟请两天假凑个七天长假，这买卖干得过。假期综合证还得多长时间才过去呢？我猜是两天。明天就好了。]]></description>
			<content:encoded><![CDATA[<p>嗓子痛的难受，加上要去取婚纱照，丫头一个人肯定是拎不了的。请了一天假，坐车时看到————花儿都开好了。</p>
<p>京城的天气忽冷忽热，有时对你热情似火，有时兜头就是一盆冷水。在反复的将羊毛裤穿起、脱下的过程中，鼻子里的水也一滴一滴的淌下。</p>
<p>默默的养病，到家就看会儿电视，直到嗑睡的不行。其实要想应对感冒，还是喝开水好的最快。于是，我好了，丫头病了,清明节也到了。</p>
<p><span id="more-2291"></span></p>
<p>丫头病的比我要严重的多，喉咙和冒火假的，躺着躺着就会头痛，痛着痛着就会哭。由于周日晚上有周会，拒接几个电话的后果还是很严重的，某人直接关了手机。</p>
<p>老婆还是坚强的，带病陪我去吃了火锅。小肥羊的火锅贵是贵了些，不过貌似还挺对症，吃完后感觉舒服多了。 <img src='http://www.xiaoxiaozi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>假期总是让人又爱又恨：没来的时候，经常幻想本周看多少书，翻多少资料，知识水平瞬间升华多少！ 真正的假期其实是这样度过的，第一天游戏+超市，第二天外卖+电影，第三天逛街+电影+感叹假期就这样蹓走了。</p>
<p>话说玩网络游戏再也没有当年的激情，玩着玩着有人要当我师傅，第一句话就是“有时间经常在线吗？” 无语，让这位滚蛋了。时间是有的，在线是不可能的。于是玩了一天半，游戏就扔在一边了。接着开始怀念传奇，我们的传奇————私服。</p>
<p>吃了药总是特别的困，丫头在凌晨1：00的时候爬床上睡觉去了。我呢却想找点刺激，毕竟还有一天就又要上班了。看了一遍《绣花鞋》，听着不太吓人的音效，回味当时蒙被子里听张震讲的鬼故事。于是，索然无味中，在2：30我也上去呼猪头了。</p>
<p>三天的假期总是一晃而过，虽然多了一天，但是还是恨。去了趟传说中的梨园狗市，喜欢上一个小猫，我都想忽略自己姓于这件事，来掏几张毛爷爷来弄个好好照顾。结果老板无情的一句“3800”让我从理想返回了现实。</p>
<p>话说狗市里的狗都有些无精打彩，而且买回去后还要弄“户口”，人还没有北京户口但是不妨碍给狗先办一个。毕竟这是一个狗日的社会。</p>
<p>今天上班，果然缺了好多人，毕竟请两天假凑个七天长假，这买卖干得过。假期综合证还得多长时间才过去呢？我猜是两天。明天就好了。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="清明小记" href="http://www.xiaoxiaozi.com/2012/04/05/2291/">清明小记</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2012/04/05/2291/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>HTML5 每天记录一点 （四）</title>
		<link>http://www.xiaoxiaozi.com/2012/03/13/2267/</link>
		<comments>http://www.xiaoxiaozi.com/2012/03/13/2267/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 11:24:29 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2267</guid>
		<description><![CDATA[在HTML5中使用iframe标签大家可得注点意。因为如下标签属性在HTML5中不再支持，而相对的也有一些新的属性被引进来。大家一起看一下吧：
<!--more-->

<table>
  <tbody><tr>
    <th align="left" width="20%">属性</th>
    <th align="left" width="25%">Value</th>
    <th align="left">描述</th>
  </tr>
    <tr>
    <td>frameborder</td>
    <td>1<br />0</td>
    <td><span style="color:red;">X</span></td>
      </tr>
    <tr>
    <td>height</td>
    <td><i>pixels（像素）</i></td>
    <td><span style="color:blue;">√</span></td>
      </tr>
    <tr>
    <td>width</td>
    <td><i>pixels（像素）</i></td>
    <td><span style="color:blue;">√</span></td>
  	</tr>
  	<tr>
    <td>src</td>
    <td><i>URL</i></td>
    <td>iframe 没有 src也就没有意义了</td>
  </tr>
    <tr>
    <td>marginheight</td>
    <td><i>pixels（像素）</i></td>
    <td><span style="color:red;">X</span></td>
      </tr>
    <tr>
    <td>marginwidth</td>
    <td><i>pixels（像素）</i></td>
    <td><span style="color:red;">X</span></td>
      </tr>
      <tr>
    <td>name</td>
    <td><i>iframe 的 name</i></td>
    <td><span style="color:blue;">√</span></td>
      </tr>
      <tr>
    <td>sandbox<span style="color:orange;">New</span></td>
    <td>安全沙箱，支持的属性为sandbox=：<br />
      "allow-forms"<br />
      "allow-same-origin"<br />
      "allow-scripts"<br />
      "allow-top-navigation"
      </td>
    <td>iframe中的内容，根据属性值的不同，有不同的限制规则</td>
    </tr>
    <tr>
    <td>scrolling</td>
    <td>yes<br />no<br />auto</td>
    <td><span style="color:red;">X</span></td>
      </tr>
      <tr>
    <td>seamless<span style="color:orange;">New</span></td>
    <td>seamless</td>
    <td>使iframe没有任何边框，看起来与父页面没有任何区别，像是其内容一部分</td>
    </tr>
  <tr>
    <td>srcdoc<span style="color:orange;">New</span></td>
    <td><i>HTML_code</i></td>
    <td>在srcdoc里面写html代码</td>
  </tr>
  </tbody></table>

[cc lang="html"]
<!Doctype>
<html>
	<head></head>
	<body>
		<header>Html Iframe srcdoc</header>
		<iframe srcdoc="<span style='color:orange;'></span>" src="http://www.baidu.com"></iframe>
	</body>
</html>
[/cc]

我一直想知道这个srcdoc到底会包含我的iframe src内容？还是怎么样。不过遗憾的是，目前大部分浏览器还不支持，而少数支持的我又不知道。这是遗憾，不过也算是对HTML5的期待吧！

关于Iframe新属性中，大家最关注的就是sandbox——提供足够安全保证的沙箱。不过我只是简单了解一下，还不深就先扔这里。不过给大家一些搜索到的优秀的资源，大家可以去看一下：

<ul>
<li><a href="http://www.web7d.com.cn/2010/02/html5-iframe-sandbox/" target="_blank">《HTML5有效提升iFrame安全性 新增Sandbox属性》</a></li>
<li><a href="http://hi.baidu.com/dingody/blog/item/d7498e23d20965e7e6cd40e0.html" target="_blank">《html5-iframe的新特性》</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>在HTML5中使用iframe标签大家可得注点意。因为如下标签属性在HTML5中不再支持，而相对的也有一些新的属性被引进来。大家一起看一下吧：<br />
<span id="more-2267"></span></p>
<table>
<tbody>
<tr>
<th align="left" width="20%">属性</th>
<th align="left" width="25%">Value</th>
<th align="left">描述</th>
</tr>
<tr>
<td>frameborder</td>
<td>1<br />0</td>
<td><span style="color:red;">X</span></td>
</tr>
<tr>
<td>height</td>
<td><i>pixels（像素）</i></td>
<td><span style="color:blue;">√</span></td>
</tr>
<tr>
<td>width</td>
<td><i>pixels（像素）</i></td>
<td><span style="color:blue;">√</span></td>
</tr>
<tr>
<td>src</td>
<td><i>URL</i></td>
<td>iframe 没有 src也就没有意义了</td>
</tr>
<tr>
<td>marginheight</td>
<td><i>pixels（像素）</i></td>
<td><span style="color:red;">X</span></td>
</tr>
<tr>
<td>marginwidth</td>
<td><i>pixels（像素）</i></td>
<td><span style="color:red;">X</span></td>
</tr>
<tr>
<td>name</td>
<td><i>iframe 的 name</i></td>
<td><span style="color:blue;">√</span></td>
</tr>
<tr>
<td>sandbox<span style="color:orange;">New</span></td>
<td>安全沙箱，支持的属性为sandbox=：<br />
      “allow-forms”<br />
      “allow-same-origin”<br />
      “allow-scripts”<br />
      “allow-top-navigation”
      </td>
<td>iframe中的内容，根据属性值的不同，有不同的限制规则</td>
</tr>
<tr>
<td>scrolling</td>
<td>yes<br />no<br />auto</td>
<td><span style="color:red;">X</span></td>
</tr>
<tr>
<td>seamless<span style="color:orange;">New</span></td>
<td>seamless</td>
<td>使iframe没有任何边框，看起来与父页面没有任何区别，像是其内容一部分</td>
</tr>
<tr>
<td>srcdoc<span style="color:orange;">New</span></td>
<td><i>HTML_code</i></td>
<td>在srcdoc里面写html代码</td>
</tr>
</tbody>
</table>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;!Doctype&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;header&gt;</span>Html Iframe srcdoc<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> srcdoc<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;span style='color:orange;'&gt;&lt;/span&gt;</span></span>&quot; src=&quot;http://www.baidu.com&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></div></div>
<p>我一直想知道这个srcdoc到底会包含我的iframe src内容？还是怎么样。不过遗憾的是，目前大部分浏览器还不支持，而少数支持的我又不知道。这是遗憾，不过也算是对HTML5的期待吧！</p>
<p>关于Iframe新属性中，大家最关注的就是sandbox——提供足够安全保证的沙箱。不过我只是简单了解一下，还不深就先扔这里。不过给大家一些搜索到的优秀的资源，大家可以去看一下：</p>
<ul>
<li><a href="http://www.web7d.com.cn/2010/02/html5-iframe-sandbox/" target="_blank">《HTML5有效提升iFrame安全性 新增Sandbox属性》</a></li>
<li><a href="http://hi.baidu.com/dingody/blog/item/d7498e23d20965e7e6cd40e0.html" target="_blank">《html5-iframe的新特性》</a></li>
</ul>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="HTML5 每天记录一点 （四）" href="http://www.xiaoxiaozi.com/2012/03/13/2267/">HTML5 每天记录一点 （四）</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2012/03/13/2267/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML5 每天记录一点 （三）</title>
		<link>http://www.xiaoxiaozi.com/2012/02/23/2257/</link>
		<comments>http://www.xiaoxiaozi.com/2012/02/23/2257/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 11:15:59 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2257</guid>
		<description><![CDATA[基本上每个网站都有自己的导航条，在HTML5之前，大家实现导航经常为：div + ul + li 标签来搞写。然后在class上面增加一些类似于nav这类的名字。来告诉代码的维护人员，这是我的导航代码：

<img src="http://farm8.staticflickr.com/7055/6922922569_282fa37172_z.jpg" alt="小小子nav" />

<!--more-->

<h3>nav 导航标签</h3>

在HTML5中，有一个新的标签：nav 它直接就代表导航，又是一个语义化的标签。

现在我们可以使用如下的方法来创建你的导航条：

[cc lang='php']
<nav>
	<a href="http://www.xiaoxiaozi.com/" title="首页"><span>首页</span></a>
	<a href="http://www.xiaoxiaozi.com/blog-brother/" title="哥学社"><span>哥学社</span></a>
	<a href="http://www.xiaoxiaozi.com/miniblog/" title="围脖"><span>围脖</span></a>
	<a href="http://www.xiaoxiaozi.com/taobao/" title="淘宝店"><span>淘宝店</span></a>
	<a href="http://www.xiaoxiaozi.com/guestbook/" title="唠呗"><span>唠呗</span></a>
	<a href="http://www.xiaoxiaozi.com/about/" title="小小子"><span>小小子</span></a>
</nav>
[/cc]

说明：在nav标签中，你可以放置任何你想放置的标签，而不单单只局限于a标签。同时nav标签也可以放在任何位置，但是最好不要放在footer标签内。虽然没有规范强制禁止此事，但是这样做可能会导致浏览器渲染不正确。

<h3>我们的浏览器是否支持HTML5？</h3>

HTML5一天一天的火起来了，我这起步这么晚的人，心里的焦虑不知你是否懂得？

面对新鲜的事物，并不是所有人都能抓住机会，所以还有相当多的一些浏览器暂不支持HTML5标准。那么我们怎么知道自己当前正在使用的浏览器表现是否良好呢？

给大家一些资源，如下：

<a href="http://fmbip.com/" title="fmbip.com" target="_blank">http://fmbip.com/</a>
乍一看感觉像是我天朝的ip138，但是稍等片刻该网站会显示您的浏览器对HTML5与CSS3的支持情况。

<a href="http://www.caniuse.com/" title="caniuse.com" target="_blank">http://www.caniuse.com/</a>
该网站列出了不被所有浏览器兼容的标签，及该标签在不同浏览器里面的情况

<h3> 一点小建议</h3>

如上所述，并非所有浏览器都可以良好的支持HTML5标准。同时，HTML5的标准也在不断的变化中，所以，是否有必要将您的blog或者公司的网站全面升级至HTML5，需要慎重！]]></description>
			<content:encoded><![CDATA[<p>基本上每个网站都有自己的导航条，在HTML5之前，大家实现导航经常为：div + ul + li 标签来搞写。然后在class上面增加一些类似于nav这类的名字。来告诉代码的维护人员，这是我的导航代码：</p>
<p><img src="http://farm8.staticflickr.com/7055/6922922569_282fa37172_z.jpg" alt="小小子nav" /></p>
<p><span id="more-2257"></span></p>
<h3>nav 导航标签</h3>
<p>在HTML5中，有一个新的标签：nav 它直接就代表导航，又是一个语义化的标签。</p>
<p>现在我们可以使用如下的方法来创建你的导航条：</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>nav<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.xiaoxiaozi.com/&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;首页&quot;</span><span style="color: #339933;">&gt;&lt;</span>span<span style="color: #339933;">&gt;</span>首页<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.xiaoxiaozi.com/blog-brother/&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;哥学社&quot;</span><span style="color: #339933;">&gt;&lt;</span>span<span style="color: #339933;">&gt;</span>哥学社<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.xiaoxiaozi.com/miniblog/&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;围脖&quot;</span><span style="color: #339933;">&gt;&lt;</span>span<span style="color: #339933;">&gt;</span>围脖<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.xiaoxiaozi.com/taobao/&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;淘宝店&quot;</span><span style="color: #339933;">&gt;&lt;</span>span<span style="color: #339933;">&gt;</span>淘宝店<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.xiaoxiaozi.com/guestbook/&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;唠呗&quot;</span><span style="color: #339933;">&gt;&lt;</span>span<span style="color: #339933;">&gt;</span>唠呗<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://www.xiaoxiaozi.com/about/&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;小小子&quot;</span><span style="color: #339933;">&gt;&lt;</span>span<span style="color: #339933;">&gt;</span>小小子<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;/</span>nav<span style="color: #339933;">&gt;</span></div></div>
<p>说明：在nav标签中，你可以放置任何你想放置的标签，而不单单只局限于a标签。同时nav标签也可以放在任何位置，但是最好不要放在footer标签内。虽然没有规范强制禁止此事，但是这样做可能会导致浏览器渲染不正确。</p>
<h3>我们的浏览器是否支持HTML5？</h3>
<p>HTML5一天一天的火起来了，我这起步这么晚的人，心里的焦虑不知你是否懂得？</p>
<p>面对新鲜的事物，并不是所有人都能抓住机会，所以还有相当多的一些浏览器暂不支持HTML5标准。那么我们怎么知道自己当前正在使用的浏览器表现是否良好呢？</p>
<p>给大家一些资源，如下：</p>
<p><a href="http://fmbip.com/" title="fmbip.com" target="_blank">http://fmbip.com/</a><br />
乍一看感觉像是我天朝的ip138，但是稍等片刻该网站会显示您的浏览器对HTML5与CSS3的支持情况。</p>
<p><a href="http://www.caniuse.com/" title="caniuse.com" target="_blank">http://www.caniuse.com/</a><br />
该网站列出了不被所有浏览器兼容的标签，及该标签在不同浏览器里面的情况</p>
<h3> 一点小建议</h3>
<p>如上所述，并非所有浏览器都可以良好的支持HTML5标准。同时，HTML5的标准也在不断的变化中，所以，是否有必要将您的blog或者公司的网站全面升级至HTML5，需要慎重！</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="HTML5 每天记录一点 （三）" href="http://www.xiaoxiaozi.com/2012/02/23/2257/">HTML5 每天记录一点 （三）</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2012/02/23/2257/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>漫漫回家路</title>
		<link>http://www.xiaoxiaozi.com/2012/01/09/2247/</link>
		<comments>http://www.xiaoxiaozi.com/2012/01/09/2247/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 06:49:05 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Myself]]></category>
		<category><![CDATA[闲聊]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2247</guid>
		<description><![CDATA[又是一年春来到，同时“运”也来了。

买车票，以前拼体力，当前讲智力，最终靠的还是运气。

在同学的大力支持下，买到了回家的车票，掰着手指头数日子：还有多少工作要年前完成，还有多少剩饭剩菜要年前打扫。

一年又一年，随着年龄的增长，记忆似乎变的越来越怪。几天前的事情已经忘的差不多了，只能靠当时的聊天记录或者笔记来回忆。而几年前一些无关痛痒的小事却是时常回荡在脑海，总是不经意间跳出来，让你回想一下，或哭、或笑！

今年的北京偶尔就会飘一场雪，为麻木的头脑带来一丝清凉。但，仍然喜欢幻想老家那闪亮的夜空，北京没有星星。

不经意间，自己即将28，到了高中时许诺结婚的年龄，那时候我说晚上要放烟花，为我的老婆。

也同样的不经意间，老爸已经50，每天坐在电脑前玩着“炮幺”，精力还算旺盛。

同样的不经意间，3年前，姥娘去了天国，那里没有旱烟。

回家，去看看家人，去陪陪家人。他们真的爱我，我也很想念你们！]]></description>
			<content:encoded><![CDATA[<p>又是一年春来到，同时“运”也来了。</p>
<p>买车票，以前拼体力，当前讲智力，最终靠的还是运气。</p>
<p>在同学的大力支持下，买到了回家的车票，掰着手指头数日子：还有多少工作要年前完成，还有多少剩饭剩菜要年前打扫。</p>
<p>一年又一年，随着年龄的增长，记忆似乎变的越来越怪。几天前的事情已经忘的差不多了，只能靠当时的聊天记录或者笔记来回忆。而几年前一些无关痛痒的小事却是时常回荡在脑海，总是不经意间跳出来，让你回想一下，或哭、或笑！</p>
<p>今年的北京偶尔就会飘一场雪，为麻木的头脑带来一丝清凉。但，仍然喜欢幻想老家那闪亮的夜空，北京没有星星。</p>
<p>不经意间，自己即将28，到了高中时许诺结婚的年龄，那时候我说晚上要放烟花，为我的老婆。</p>
<p>也同样的不经意间，老爸已经50，每天坐在电脑前玩着“炮幺”，精力还算旺盛。</p>
<p>同样的不经意间，3年前，姥娘去了天国，那里没有旱烟。</p>
<p>回家，去看看家人，去陪陪家人。他们真的爱我，我也很想念你们！</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="漫漫回家路" href="http://www.xiaoxiaozi.com/2012/01/09/2247/">漫漫回家路</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2012/01/09/2247/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>JSONP与POST方式请求</title>
		<link>http://www.xiaoxiaozi.com/2011/11/25/2239/</link>
		<comments>http://www.xiaoxiaozi.com/2011/11/25/2239/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 11:18:06 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jsonp]]></category>
		<category><![CDATA[post]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2239</guid>
		<description><![CDATA[JSONP是一种非官方协议，可以解决AJAX跨域提交数据情况。

安全部门的同事测试发现，都是GET的请求，相比较而言不如POST安全，还是尽量改了吧。

拖啊拖，终于还有别的业务要这个接口，想了想还是改了吧，反正听人劝吃饱饭嘛 。但是，JSONP真的支持POST提交吗？

<!--more-->

先是一天夜里加班无聊，做了一下POST，发现请求发送过去的METHOD为OPTIONS，而不是POST，同时没有得到返回结果。

今天下午抽时间，特意处理一下这个事情。事实证明OPTIONS的状态可能是我拼错东西了，反正今天没有重现。不过当我把数据改为POST后，我发现COOKIE已经生成了，证明我数据提交过去了。但是content里没有返回值，Firebug看不到，但是Fiddler可以看到。

<img src="http://www.xiaoxiaozi.com/wp-content/uploads/2011/11/jsonp_post.jpg" alt="jsonp post 截图" title="jsonp_post" width="606" height="164" class="alignnone size-full wp-image-2241" />

POST提交，firebug之所以看不到的原因是，我的执行跨域了。我执行的域名为localhost，而提交请求的域名为公司域名。

一计不成，又生一计。咋的活人还能让尿憋死？

jQuery里面有N多jsonp的方法，挨个试呗：getScript   getJson   ajax（ 指定dataType为jsonp或script）

发现jQuery的getScript不支持POST，但是其等同于$.ajax(datatype:script)啊，咱再指定type为Post不就成了嘛 。不过改完后，发现还是变成了GET请求，很奇怪，翻看API如下：

<blockquote cite="http://api.jquery.com/jQuery.ajax/">
"script": Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, "_=[TIMESTAMP]", to the URL unless the cache option is set to true. <strong style="color:red;">Note: This will turn POSTs into GETs for remote-domain requests. </strong>
</blockquote>

看来，你即使设置为POST，jQuery发现是getScript时，也会自动给你转成GET。测试 datatype为jsonp时 POST请求同样会被转化成GET。

难道是JSONP不支持POST方式发起请求吗？

一个外国友人，和咱遇到同样的问题：<a href="http://stackoverflow.com/questions/3860111/how-to-make-a-jsonp-post-request-that-specifies-contenttype-with-jquery" target="_blank">http://stackoverflow.com/questions/3860111/how-to-make-a-jsonp-post-request-that-specifies-contenttype-with-jquery</a>

得到的回答是这样的：

<img alt="" src="http://farm7.staticflickr.com/6039/6399159629_19270a76cd_b.jpg" title="jsonp_answer" width="744" height="389" />

找到这篇文章，<a href="http://www.nowamagic.net/librarys/veda/detail/224" target="_blank">《JSONP跨域的原理解析》</a> 从文中可以看出，其实使用特殊的方法也是可以支持POST的，不过太过繁琐。作者举的例子为：动态创建iframe方式POST跨域。

最后，我想说的是，要想支持POST方式的JSONP很难，咱就别难为自己了，这个接口不改了 - -!!]]></description>
			<content:encoded><![CDATA[<p>JSONP是一种非官方协议，可以解决AJAX跨域提交数据情况。</p>
<p>安全部门的同事测试发现，都是GET的请求，相比较而言不如POST安全，还是尽量改了吧。</p>
<p>拖啊拖，终于还有别的业务要这个接口，想了想还是改了吧，反正听人劝吃饱饭嘛 。但是，JSONP真的支持POST提交吗？</p>
<p><span id="more-2239"></span></p>
<p>先是一天夜里加班无聊，做了一下POST，发现请求发送过去的METHOD为OPTIONS，而不是POST，同时没有得到返回结果。</p>
<p>今天下午抽时间，特意处理一下这个事情。事实证明OPTIONS的状态可能是我拼错东西了，反正今天没有重现。不过当我把数据改为POST后，我发现COOKIE已经生成了，证明我数据提交过去了。但是content里没有返回值，Firebug看不到，但是Fiddler可以看到。</p>
<p><img src="http://www.xiaoxiaozi.com/wp-content/uploads/2011/11/jsonp_post.jpg" alt="jsonp post 截图" title="jsonp_post" width="606" height="164" class="alignnone size-full wp-image-2241" /></p>
<p>POST提交，firebug之所以看不到的原因是，我的执行跨域了。我执行的域名为localhost，而提交请求的域名为公司域名。</p>
<p>一计不成，又生一计。咋的活人还能让尿憋死？</p>
<p>jQuery里面有N多jsonp的方法，挨个试呗：getScript   getJson   ajax（ 指定dataType为jsonp或script）</p>
<p>发现jQuery的getScript不支持POST，但是其等同于$.ajax(datatype:script)啊，咱再指定type为Post不就成了嘛 。不过改完后，发现还是变成了GET请求，很奇怪，翻看API如下：</p>
<blockquote cite="http://api.jquery.com/jQuery.ajax/"><p>
“script”: Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, “_=[TIMESTAMP]“, to the URL unless the cache option is set to true. <strong style="color:red;">Note: This will turn POSTs into GETs for remote-domain requests. </strong>
</p></blockquote>
<p>看来，你即使设置为POST，jQuery发现是getScript时，也会自动给你转成GET。测试 datatype为jsonp时 POST请求同样会被转化成GET。</p>
<p>难道是JSONP不支持POST方式发起请求吗？</p>
<p>一个外国友人，和咱遇到同样的问题：<a href="http://stackoverflow.com/questions/3860111/how-to-make-a-jsonp-post-request-that-specifies-contenttype-with-jquery" target="_blank">http://stackoverflow.com/questions/3860111/how-to-make-a-jsonp-post-request-that-specifies-contenttype-with-jquery</a></p>
<p>得到的回答是这样的：</p>
<p><img alt="" src="http://farm7.staticflickr.com/6039/6399159629_19270a76cd_b.jpg" title="jsonp_answer" width="744" height="389" /></p>
<p>找到这篇文章，<a href="http://www.nowamagic.net/librarys/veda/detail/224" target="_blank">《JSONP跨域的原理解析》</a> 从文中可以看出，其实使用特殊的方法也是可以支持POST的，不过太过繁琐。作者举的例子为：动态创建iframe方式POST跨域。</p>
<p>最后，我想说的是，要想支持POST方式的JSONP很难，咱就别难为自己了，这个接口不改了 &#8211; -!!</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="JSONP与POST方式请求" href="http://www.xiaoxiaozi.com/2011/11/25/2239/">JSONP与POST方式请求</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2011/11/25/2239/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>HTML5 每天记录一点 （二）</title>
		<link>http://www.xiaoxiaozi.com/2011/09/14/2233/</link>
		<comments>http://www.xiaoxiaozi.com/2011/09/14/2233/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 15:50:00 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2233</guid>
		<description><![CDATA[拿blog举例，一般都有侧边栏。在侧边栏，我们可以记录一些友情链接、标签云等等。这些一般都和左侧文章中的正文(article）相关，html5中单独有一个标签：aside，其定义的是正文之外的内容。

[cc lang='html']
<article>
今天啊，爷爷主要给你讲一下粮票的故事：
</article>

<aside>
你想买粮票吗？XXX收藏专家为您服务！
</aside>
[/cc]

<strong>有些文章上面说，aside主要是对应于article的，所以有aside就应该有article标签。但是像<a href='http://www.w3schools.com/html5/tag_aside.asp' target='_blank'>w3schools</a>上面的示例也没有article标签，具体，大家自行分析！</strong>

过去，我们的一个html页面基本结构代码如下：

[cc lang='html']
<div class='header'>
      <div class='nav'>
      </div>
</div>

<div class='content'>
     <div class='left'>
     </div>
     <div class='right'>
     </div>
</div>

<div class=‘footer'>
    <div class='copyright'>
    </div>
</div>
[/cc]

结构冗余，为了描述页头和页尾，我们一般使用div标签，然后通过指定className来设置样式。在html5中，我们可以使用更富有语义的header标签和footer标签，以及nav标签来完成我们的架构，代码如下：

[cc lang='html']
<header>
     <nav></nav>
</header>
<article>
     <section></section>
     <div></div>
</article>
<footer>
</footer>
[/cc]

在过去，我们一个图片下面加描述，其实一般情况下都是加一个新的标签，来写这个图片的意义。但是实际上，在搜索引擎也好，在html的结构中也好，根本无法标识出你写的描述与图片有什么关联。

现在，html5中为我们增加了figure标签，这个标签可以将其他标签与图片（传说中还有代码等）标签合为一个组标签。在里面的文字内容会是对图片的描述：

[cc lang='html']
<figure>
  <p>这张图是360的Logo</p>
  <img src="http://img1.qihoo.com/images/2011/360/logo.png" />
</figure>

<figure>
  <img src="http://img1.qihoo.com/images/2011/360/logo.png" />
  <p>这张图是360的Logo</p>
</figure>
[/cc]

好了，今天到这，赶明咱继续！]]></description>
			<content:encoded><![CDATA[<p>拿blog举例，一般都有侧边栏。在侧边栏，我们可以记录一些友情链接、标签云等等。这些一般都和左侧文章中的正文(article）相关，html5中单独有一个标签：aside，其定义的是正文之外的内容。</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;article&gt;</span><br />
今天啊，爷爷主要给你讲一下粮票的故事：<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span><br />
<br />
<span style="color: #009900;">&lt;aside&gt;</span><br />
你想买粮票吗？XXX收藏专家为您服务！<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>aside&gt;</span></div></div>
<p><strong>有些文章上面说，aside主要是对应于article的，所以有aside就应该有article标签。但是像<a href='http://www.w3schools.com/html5/tag_aside.asp' target='_blank'>w3schools</a>上面的示例也没有article标签，具体，大家自行分析！</strong></p>
<p>过去，我们的一个html页面基本结构代码如下：</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'header'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'nav'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'content'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'left'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'right'</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span>‘footer<span style="color: #ff0000;">'&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'copyright'</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></div>
<p>结构冗余，为了描述页头和页尾，我们一般使用div标签，然后通过指定className来设置样式。在html5中，我们可以使用更富有语义的header标签和footer标签，以及nav标签来完成我们的架构，代码如下：</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;header&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;nav&gt;&lt;<span style="color: #66cc66;">/</span>nav&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span><br />
<span style="color: #009900;">&lt;article&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;section&gt;&lt;<span style="color: #66cc66;">/</span>section&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span><br />
<span style="color: #009900;">&lt;footer&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>footer&gt;</span></div></div>
<p>在过去，我们一个图片下面加描述，其实一般情况下都是加一个新的标签，来写这个图片的意义。但是实际上，在搜索引擎也好，在html的结构中也好，根本无法标识出你写的描述与图片有什么关联。</p>
<p>现在，html5中为我们增加了figure标签，这个标签可以将其他标签与图片（传说中还有代码等）标签合为一个组标签。在里面的文字内容会是对图片的描述：</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;figure&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>这张图是360的Logo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://img1.qihoo.com/images/2011/360/logo.png&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>figure&gt;</span><br />
<br />
<span style="color: #009900;">&lt;figure&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://img1.qihoo.com/images/2011/360/logo.png&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>这张图是360的Logo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>figure&gt;</span></div></div>
<p>好了，今天到这，赶明咱继续！</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="HTML5 每天记录一点 （二）" href="http://www.xiaoxiaozi.com/2011/09/14/2233/">HTML5 每天记录一点 （二）</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2011/09/14/2233/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>HTML5 每天记录一点 （一）</title>
		<link>http://www.xiaoxiaozi.com/2011/09/06/2229/</link>
		<comments>http://www.xiaoxiaozi.com/2011/09/06/2229/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 15:50:00 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2229</guid>
		<description><![CDATA[HTML5， 首先记住的一条就是，Doctype声明短了。

[cc lang='html']
<!-- 原来的声明 -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--HTML5的声明 -->

<!DOCTYPE html>
[/cc]

再来看一下meta的字符集声明，一个字：美！

[cc lang='html']
<!-- 原来的声明 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- HTML5的声明 -->
<meta charset="UTF-8">
[/cc]

HTML5在标签语义化上做了很多处理，原来由于TABLE布局的简单，大家开始使用。但是没有语义，且CSS的发展，大家布局普遍使用div＋css的模式。

可是div也没有啥意义啊，所以，HTML5推出了两个新标签：section和article

从字面意义上来理解，section为段落，而article为文章。凡是可以单拿出来做为文章的，都可以使用article，我是这么理解的，不是很对，但是先这么记着吧。

[cc lang='html']
     <article>
          <section id="mixing">
              <h2>秋天到了</h2>
              <p>说话这天还真是凉了，大家记得多穿衣！</p>
          </section>
          <section id="baking">
              <h2>夏天走了</h2>
              <p>夏天晚上7：00还透亮，现在乌漆马黑的</p>                                                                                   
          </section>
      </article>
[/cc]

今天先白话这么多，明天继续！]]></description>
			<content:encoded><![CDATA[<p>HTML5， 首先记住的一条就是，Doctype声明短了。</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!-- 原来的声明 --&gt;</span><br />
<br />
<span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span><br />
<span style="color: #00bbdd;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span><br />
<br />
<span style="color: #808080; font-style: italic;">&lt;!--HTML5的声明 --&gt;</span><br />
<br />
<span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span></div></div>
<p>再来看一下meta的字符集声明，一个字：美！</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">&lt;!-- 原来的声明 --&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<br />
<span style="color: #808080; font-style: italic;">&lt;!-- HTML5的声明 --&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UTF-8&quot;</span>&gt;</span></div></div>
<p>HTML5在标签语义化上做了很多处理，原来由于TABLE布局的简单，大家开始使用。但是没有语义，且CSS的发展，大家布局普遍使用div＋css的模式。</p>
<p>可是div也没有啥意义啊，所以，HTML5推出了两个新标签：section和article</p>
<p>从字面意义上来理解，section为段落，而article为文章。凡是可以单拿出来做为文章的，都可以使用article，我是这么理解的，不是很对，但是先这么记着吧。</p>
<div class="codecolorer-container html4strict dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;article&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;section <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mixing&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>秋天到了<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>说话这天还真是凉了，大家记得多穿衣！<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>section&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;section <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;baking&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>夏天走了<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>夏天晚上7：00还透亮，现在乌漆马黑的<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>section&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span></div></div>
<p>今天先白话这么多，明天继续！</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="HTML5 每天记录一点 （一）" href="http://www.xiaoxiaozi.com/2011/09/06/2229/">HTML5 每天记录一点 （一）</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2011/09/06/2229/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>闲扯</title>
		<link>http://www.xiaoxiaozi.com/2011/09/06/2227/</link>
		<comments>http://www.xiaoxiaozi.com/2011/09/06/2227/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 15:38:43 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Myself]]></category>
		<category><![CDATA[无题]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2227</guid>
		<description><![CDATA[先说些题外话，好久没写blog了。

每天早上都会想的就是：真想早点下班，回家学学啥分布式，学学啥系统运维，学学啥HTML5的。

每天晚上到家都会想的是：TNND这可咋学呢？真TMD累，又打了一天酱油，参加各种会，准备各种酱油。睡觉，不学习了。

第二天，重复今天的事情。

和同事聊天，说了上面的事，过的和行尸走肉一般。一年到头，除了中秋别人给了点月饼这些福利，别的为自己啥也没看见。同事说，这其实就是年龄大了，已经学不进去了。

想想也是，马上而立了，每天脑子里装的都是一些无用的事，比如今天羡慕哪个白痴中了5.4亿巨奖了，明天祈祷那个白痴忘记去领奖了之类的。

貌似这个状态有些日子了，再不治理可不行了。

继续吧，想想两年前，每天一篇blog的日子，真是不错。]]></description>
			<content:encoded><![CDATA[<p>先说些题外话，好久没写blog了。</p>
<p>每天早上都会想的就是：真想早点下班，回家学学啥分布式，学学啥系统运维，学学啥HTML5的。</p>
<p>每天晚上到家都会想的是：TNND这可咋学呢？真TMD累，又打了一天酱油，参加各种会，准备各种酱油。睡觉，不学习了。</p>
<p>第二天，重复今天的事情。</p>
<p>和同事聊天，说了上面的事，过的和行尸走肉一般。一年到头，除了中秋别人给了点月饼这些福利，别的为自己啥也没看见。同事说，这其实就是年龄大了，已经学不进去了。</p>
<p>想想也是，马上而立了，每天脑子里装的都是一些无用的事，比如今天羡慕哪个白痴中了5.4亿巨奖了，明天祈祷那个白痴忘记去领奖了之类的。</p>
<p>貌似这个状态有些日子了，再不治理可不行了。</p>
<p>继续吧，想想两年前，每天一篇blog的日子，真是不错。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="闲扯" href="http://www.xiaoxiaozi.com/2011/09/06/2227/">闲扯</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2011/09/06/2227/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>这该死的感冒</title>
		<link>http://www.xiaoxiaozi.com/2011/07/28/2218/</link>
		<comments>http://www.xiaoxiaozi.com/2011/07/28/2218/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 08:49:14 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[Myself]]></category>
		<category><![CDATA[感冒]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2218</guid>
		<description><![CDATA[感冒真痛苦，周五就预感嗓子不舒服，果断在周一请假。

结果，我预料的很准。周六——周一，这几天就没有消停，嗓子基本说不出话来，然后还高烧。喝了丫头做的可乐姜丝，有点辣，有点甜。

周二上班，一开机，发现攒了60封未读邮件，真想跳起来骂，你们这帮SXXX。。

从二楼搬到了一楼，空调在头顶，相当的给力。结果团队的一位小女生也开始咳嗽，真不是我传染的。

拿了件外套来公司，要不真顶不住 。买了瓶止咳糖浆，还挺甜，喝了后效果也不错。咳的少了。

披着外套，来来往往的人都难免多看一眼，不过看也白看，爱咋咋地，真冷啊。。把挡板调了也不顶用，正在头顶的东西你伤不起啊。

想起小丁了，那个三年前因为冻的感冒，所以离职的孩子。

我很好！]]></description>
			<content:encoded><![CDATA[<p>感冒真痛苦，周五就预感嗓子不舒服，果断在周一请假。</p>
<p>结果，我预料的很准。周六——周一，这几天就没有消停，嗓子基本说不出话来，然后还高烧。喝了丫头做的可乐姜丝，有点辣，有点甜。</p>
<p>周二上班，一开机，发现攒了60封未读邮件，真想跳起来骂，你们这帮SXXX。。</p>
<p>从二楼搬到了一楼，空调在头顶，相当的给力。结果团队的一位小女生也开始咳嗽，真不是我传染的。</p>
<p>拿了件外套来公司，要不真顶不住 。买了瓶止咳糖浆，还挺甜，喝了后效果也不错。咳的少了。</p>
<p>披着外套，来来往往的人都难免多看一眼，不过看也白看，爱咋咋地，真冷啊。。把挡板调了也不顶用，正在头顶的东西你伤不起啊。</p>
<p>想起小丁了，那个三年前因为冻的感冒，所以离职的孩子。</p>
<p>我很好！</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="这该死的感冒" href="http://www.xiaoxiaozi.com/2011/07/28/2218/">这该死的感冒</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2011/07/28/2218/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Sina OAuth request_token 如何存储？</title>
		<link>http://www.xiaoxiaozi.com/2011/06/18/2215/</link>
		<comments>http://www.xiaoxiaozi.com/2011/06/18/2215/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 03:08:56 +0000</pubDate>
		<dc:creator>simaopig</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[sina]]></category>

		<guid isPermaLink="false">http://www.xiaoxiaozi.com/?p=2215</guid>
		<description><![CDATA[闲来无事，研究新浪的OAuth接口，来允许新浪用户登录，其过程呢是比较繁琐的。虽然有一些SDK可以下载，但是都不尽如人意。

资源如下：

<ol class="list">
<li><a href='http://open.weibo.com/wiki/index.php/Oauth' target='_blank'>新浪的OAuth API地址</a></li>

<li><a href="http://www.cnblogs.com/liuxinet/archive/2011/01/25/1944752.html" target="_blank">新浪微博开放平台OAuth授权解决方案（含代码</a>） </li>
</ol>

纠结的问题在于此：

<ol>
<li>新浪使用的是OAuth 1.0 ，在用户授权验证前，需要先生成request_token</li>

<li>request_token 应该如何存储？</li>

<li>SDK中的建议是存储在SESSION中，但是如果我有多台前端机，DNS解析又是不靠谱的，那么我的多台机器如何同步SESSION？</li>

<li>SESSION存储在数据库中可以避免此问题，可是问题是我的业务不需要用到数据库，为了存储临时性的一次SESSION而用库，太不划算。</li>

<li>存储到COOKIE中，多台前端机的问题就不用关心了，不过是否会有不安全因素呢？</li>

<li>COOKIE中是否可以存储一个字符串，该串为MEMCACHE的KEY，由MEM来存储这个一次性的request_token 是否可行？</li>

<li>别人拿到COOKIE，COOKIE可以加一些验证，比如签名之类的东西，并不是随便改造就可以破坏我的程序的。</li>
</ol>

分析过程大致如上，具体如何实现还在纠结！]]></description>
			<content:encoded><![CDATA[<p>闲来无事，研究新浪的OAuth接口，来允许新浪用户登录，其过程呢是比较繁琐的。虽然有一些SDK可以下载，但是都不尽如人意。</p>
<p>资源如下：</p>
<ol class="list">
<li><a href='http://open.weibo.com/wiki/index.php/Oauth' target='_blank'>新浪的OAuth API地址</a></li>
<li><a href="http://www.cnblogs.com/liuxinet/archive/2011/01/25/1944752.html" target="_blank">新浪微博开放平台OAuth授权解决方案（含代码</a>） </li>
</ol>
<p>纠结的问题在于此：</p>
<ol>
<li>新浪使用的是OAuth 1.0 ，在用户授权验证前，需要先生成request_token</li>
<li>request_token 应该如何存储？</li>
<li>SDK中的建议是存储在SESSION中，但是如果我有多台前端机，DNS解析又是不靠谱的，那么我的多台机器如何同步SESSION？</li>
<li>SESSION存储在数据库中可以避免此问题，可是问题是我的业务不需要用到数据库，为了存储临时性的一次SESSION而用库，太不划算。</li>
<li>存储到COOKIE中，多台前端机的问题就不用关心了，不过是否会有不安全因素呢？</li>
<li>COOKIE中是否可以存储一个字符串，该串为MEMCACHE的KEY，由MEM来存储这个一次性的request_token 是否可行？</li>
<li>别人拿到COOKIE，COOKIE可以加一些验证，比如签名之类的东西，并不是随便改造就可以破坏我的程序的。</li>
</ol>
<p>分析过程大致如上，具体如何实现还在纠结！</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 本文采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">BY-NC-SA</a> 协议进行授权 | <a href="http://www.xiaoxiaozi.com">小小子</a><br />转载请注明转自《<a rel="bookmark" title="Sina OAuth request_token 如何存储？" href="http://www.xiaoxiaozi.com/2011/06/18/2215/">Sina OAuth request_token 如何存储？</a>》</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaoxiaozi.com/2011/06/18/2215/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

