Html5---可编辑的Contenteditable

Html5的新元素,使得表格的每个文本都是在网页中可编辑的,效果很好,很实用!

Chinese Name: moumou Birthday: 1931.01.13
English Name: momo Career: Singer
Other Name: test Representative works: Mr.
Nationality: Korea Team: KARA
Nation: Korean Constellation: Capricom
Korea: Jeolla view Chau Blood Type: B-type

主要就是<table id="edit" Contenteditable="true"></table>属性设置为true就可以了,方便简洁

上述代码:

<htm>
<head>
<title></title>
</head>
<body>
<table id="edit" contenteditable="true">
<tr><td>Chinese Name:</td>

<td>moumou</td><td>Birthday:</td>

<td>1931.01.13</td></tr>

<tr><td>English Name:</td>

<td>momo</td><td>Career:</td>

<td>Singer</td></tr>

<tr><td>Other Name:</td>

<td>test</td>

<td>Representative works:</td>

<td>Mr.</td></tr>

<tr><td>Nationality:</td>

<td>Korea</td><td>Team:</td>

<td>KARA</td></tr>

<tr><td>Nation:</td>

<td>Korean</td>

<td>Constellation:</td>

<td>Capricom</td></tr>

<tr><td>Korea:</td>

<td>Jeolla view Chau</td>

<td>Blood Type:</td>

<td>B-type</td></tr>


</table>
</body>
</htm>



posted @ 2011-10-03 09:09  brainmao  阅读(2004)  评论(0编辑  收藏  举报