<?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>大伟的博客 &#187; html5</title>
	<atom:link href="http://www.oneflash.net/tag/html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oneflash.net</link>
	<description>www.oneflash.net</description>
	<lastBuildDate>Tue, 06 Dec 2011 05:23:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>HTML5的表单验证</title>
		<link>http://www.oneflash.net/2010/04/html5-form-valid/</link>
		<comments>http://www.oneflash.net/2010/04/html5-form-valid/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 10:47:25 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web技术]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.oneflash.net/?p=333</guid>
		<description><![CDATA[输入框自动获取焦点 在网页加载完成是，光标自动聚焦在用户需要输入的地方，比如邮箱登陆页面的输入用户名，之前我们需要在网页onload的时候来用javascript代码指定某个输入框获取焦点的做法，现在html 5直接支持在输入框中加入autofocus属性。 文本框的输入提示 之前我们需要用javascript的onblur、onfocus来实现一个输入框的提示信息，现在只需要增加一个placeholder属性。 强大的表单验证功能 判断必填项 判断数据格式 有趣的input type=”range” 可以直接拖动，可以设置最小值、最大值、以及每拖动一格的步长。 input type=”number” 可以通过点击右侧的上下箭头，直接进行加减操作。 输入框下拉提示 可以用作现在很流行的ajax输入提示，也可以当作是一个可编辑的下拉菜单。即可自行输入，也可以直接下拉选择。 还有默认的日期选择 完整的DEMO:http://www.oneflash.net/demo/html5-form-demo.html，请使用最新版本的Chrome+Oprea一起浏览，才能看到全部效果……]]></description>
			<content:encoded><![CDATA[<ul>
<li>
<h3>输入框自动获取焦点</h3>
<p>在网页加载完成是，光标自动聚焦在用户需要输入的地方，比如邮箱登陆页面的输入用户名，之前我们需要在网页onload的时候来用javascript代码指定某个输入框获取焦点的做法，现在html 5直接支持在输入框中加入autofocus属性。</p>
<pre class="brush: xml; title: ; notranslate">
&lt;input type=&quot;text&quot; id=&quot;username&quot; name=&quot;username&quot; autofocus /&gt;
</pre>
</li>
<li>
<h3>文本框的输入提示</h3>
<div class="imgClass"><img src="http://www.oneflash.net/attachments/2010/04/demo1.gif" alt="" title="demo1"  /></div>
<p>之前我们需要用javascript的onblur、onfocus来实现一个输入框的提示信息，现在只需要增加一个placeholder属性。</p>
<pre class="brush: xml; title: ; notranslate">
&lt;input type=&quot;email&quot; id=&quot;uemail&quot; name=&quot;uemail&quot; placeholder=&quot;example@domain.com&quot; required /&gt;
</pre>
</li>
<li>
<h3>强大的表单验证功能</h3>
<div class="imgClass"><img src="http://www.oneflash.net/attachments/2010/04/demo2.gif" alt="" title="demo2"  /></div>
<p>判断必填项</p>
<div class="imgClass"><img src="http://www.oneflash.net/attachments/2010/04/demo3.gif" alt="" title="demo3"  /></div>
<p>判断数据格式</p>
</li>
<li>
<h3>有趣的input type=”range”</h3>
<div class="imgClass"><img src="http://www.oneflash.net/attachments/2010/04/demo4.gif" alt="" title="demo4"  /></div>
<p>可以直接拖动，可以设置最小值、最大值、以及每拖动一格的步长。</p>
<pre class="brush: xml; title: ; notranslate">
&lt;input type=&quot;range&quot; min=&quot;1&quot; max=&quot;100&quot; step=&quot;10&quot; name=&quot;s&quot; /&gt;
</pre>
</li>
<li>
<h3>input type=”number”</h3>
<div class="imgClass"><img src="http://www.oneflash.net/attachments/2010/04/demo6.gif" alt="" title="demo6"  /></div>
<p>可以通过点击右侧的上下箭头，直接进行加减操作。</p>
</li>
<li>
<h3>输入框下拉提示</h3>
<div class="imgClass"><img src="http://www.oneflash.net/attachments/2010/04/demo5.gif" alt="" title="demo5"  /></div>
<p>可以用作现在很流行的ajax输入提示，也可以当作是一个可编辑的下拉菜单。即可自行输入，也可以直接下拉选择。</p>
<pre class="brush: xml; title: ; notranslate">
&lt;input id=&quot;search&quot; type=&quot;url&quot; list=&quot;searchlist&quot; required /&gt;
&lt;datalist id=&quot;searchlist&quot;&gt;
	&lt;option value=&quot;http://www.google.com&quot; label=&quot;Google&quot; /&gt;
	&lt;option value=&quot;http://www.yahoo.com&quot; label=&quot;Yahoo&quot; /&gt;
	&lt;option value=&quot;http://www.bing.com&quot; label=&quot;Bing&quot; /&gt;
	&lt;option value=&quot;http://www.baidu.com&quot; label=&quot;Baidu&quot; /&gt;
&lt;/datalist&gt;
</pre>
</li>
<li>
<h3>还有默认的日期选择</h3>
<div class="imgClass"><img src="http://www.oneflash.net/attachments/2010/04/demo7.gif" alt="" title="demo7"  /></div>
<pre class="brush: xml; title: ; notranslate">
&lt;input type=&quot;date&quot; name=&quot;birthday&quot; /&gt;
</pre>
</li>
</ul>
<p>完整的DEMO:<a href="http://www.oneflash.net/demo/html5-form-demo.html">http://www.oneflash.net/demo/html5-form-demo.html</a>，请使用最新版本的Chrome+Oprea一起浏览，才能看到全部效果……</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oneflash.net/2010/04/html5-form-valid/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>HTML5的写法</title>
		<link>http://www.oneflash.net/2010/04/html5-format/</link>
		<comments>http://www.oneflash.net/2010/04/html5-format/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 05:19:28 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web技术]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.oneflash.net/?p=329</guid>
		<description><![CDATA[对比一下XHTML 1.0 Transitional的规范，html5基本上没有XHTML 1.0 Transitional严格的要求，并且简化了很多东西。 文档声明更简单了。 html标签上不需要声明命名空间。 字符集编码声明也简单了 可以不用给css及javascript代码写type属性了 没有XHTML代码规范的要求 所有的标记都必须要有一个相应的结束标记； 所有标签的元素和属性的名字都必须使用小写； 所有的XML标记都必须合理嵌套； 所有的属性必须用引号”"括起来；]]></description>
			<content:encoded><![CDATA[<p>对比一下XHTML 1.0 Transitional的规范，html5基本上没有XHTML 1.0 Transitional严格的要求，并且简化了很多东西。</p>
<ul>
<li>
<h3>文档声明更简单了。</h3>
<pre class="brush: xml; title: ; notranslate">
&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;!--在HTML5中，这样写：--&gt;
&lt;!DOCTYPE html&gt;
</pre>
</li>
<li>
<h3>html标签上不需要声明命名空间。</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;zh-CN&quot;&gt;
&lt;!--在HTML5中，这样写：--&gt;
&lt;html  lang=&quot;zh-CN&quot;&gt;
</pre>
</li>
<li>
<h3>字符集编码声明也简单了</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
&lt;!--在HTML5中，这样写：--&gt;
&lt;meta charset=&quot;UTF-8&quot; /&gt;
</pre>
</li>
<li>
<h3>可以不用给css及javascript代码写type属性了</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;/style&gt;
&lt;!--在HTML5中，可以直接写：--&gt;
&lt;script&gt;&lt;/script&gt;
&lt;style&gt;&lt;/style&gt;
</pre>
</li>
<li>
<h3>没有XHTML代码规范的要求</h3>
<p>所有的标记都必须要有一个相应的结束标记；<br />
所有标签的元素和属性的名字都必须使用小写；<br />
所有的XML标记都必须合理嵌套；<br />
所有的属性必须用引号”"括起来；</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=test&gt;&lt;/div&gt;
&lt;br&gt;
&lt;INPUT TYPE=&quot;TEXT&quot; /&gt;
&lt;!--这些都不做严格要求--&gt;
</pre>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.oneflash.net/2010/04/html5-format/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

