作者在 2008-09-28 00:36:41 发布以下内容
<style>
body{
font-size:12px;
background-color: #E7E7E7;
}
#edit{border:solid #CCCCCC 1px;;overflow-y:auto;margin-bottom:auto;height:250px; background-color:#FFFFFF}
#view{border:solid #CCCCCC 1px;;overflow-y:auto;margin-bottom:auto;height:150px; background-color:#FFFFFF}
</style>
<form action="add.asp" name="form" method="post">
<table "100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
body{
font-size:12px;
background-color: #E7E7E7;
}
#edit{border:solid #CCCCCC 1px;;overflow-y:auto;margin-bottom:auto;height:250px; background-color:#FFFFFF}
#view{border:solid #CCCCCC 1px;;overflow-y:auto;margin-bottom:auto;height:150px; background-color:#FFFFFF}
</style>
<form action="add.asp" name="form" method="post">
<table "100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
</td>
</tr>
<tr>
<td>
<div id="edit" contenteditable="true" onblur="document.getElementById('view').value=document.getElementById('edit').innerHTML" ></div>
</td>
</tr>
<tr>
<td height="30">
<input type="button" value="代码模式" onclick="document.getElementById('view').value=document.getElementById('edit').innerHTML" style="border:solid #CCCCCC 1px;">
<input type="button" value="编辑模式" onclick="document.getElementById('edit').innerHTML=document.getElementById('view').value" style="border:solid #CCCCCC 1px;"></td>
</tr>
<tr>
<td><textarea id="view" name="view"></textarea></td>
</tr>
<tr>
<td height="30" align="center">
<input type="submit" value="提 交" onclick="document.getElementById('view').value=document.getElementById('edit').innerHTML" style="border:solid #CCCCCC 1px;"></td>
</tr>
</table>
</form>
</tr>
<tr>
<td>
<div id="edit" contenteditable="true" onblur="document.getElementById('view').value=document.getElementById('edit').innerHTML" ></div>
</td>
</tr>
<tr>
<td height="30">
<input type="button" value="代码模式" onclick="document.getElementById('view').value=document.getElementById('edit').innerHTML" style="border:solid #CCCCCC 1px;">
<input type="button" value="编辑模式" onclick="document.getElementById('edit').innerHTML=document.getElementById('view').value" style="border:solid #CCCCCC 1px;"></td>
</tr>
<tr>
<td><textarea id="view" name="view"></textarea></td>
</tr>
<tr>
<td height="30" align="center">
<input type="submit" value="提 交" onclick="document.getElementById('view').value=document.getElementById('edit').innerHTML" style="border:solid #CCCCCC 1px;"></td>
</tr>
</table>
</form>