什么是网站标准化?
- > 使用XHTML对网站进行重构
- > 使用CSS使表现与结构分离
- > 使用DOM使行为与结构分离
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title> 最简单的在线编辑器 </title>
<style>
body{font-size:12px;}
#edit,#view{border:1px solid red;width:100%;height:200px;overflow-y:auto;margin-bottom:10px;}
#view{border-color:#ddd;}
</style>
</head>
<body>
最简单的在线编辑器, only for ie
<div id="edit" contenteditable="true">
编辑区
</div>
<input type="button" value="查看代码↓" onclick="document.getElementById('view').value=document.getElementById('edit').innerHTML">
<input type="button" value="更新编辑区↑" onclick="document.getElementById('edit').innerHTML=document.getElementById('view').value">
<textarea id="view">
代码区
</textarea>
</body>
</html>