<HTML>
<HEAD>
<TITLE> html编辑器教程 </TITLE>
<script language="javascript">
<!--
function init()
{
olEditor.document.open();
olEditor.document.write ("<div><i>HTML</i><b>编</b><font color= red>辑</font><u>器</u></div>");
olEditor.document.close();
olEditor.document.designMode="on"; //加上这个普通的iframe就可以变成一个在线编辑器了
}
function InsertDate(date)
{
olEditor.focus();
olEditor.document.selection.createRange().pasteHTML(date);
olEditor.focus();
}
// -->
</script>
</HEAD>
<BODY onload="init()">
<FORM METHOD=POST ACTION="" name="form1">
<input type="text" name="myInsertDate" value="被插入数据" size="60"/>
<input type="button" value="将数据插入编辑器中的光标位置" onclick="InsertDate (document.all.myInsertDate.value)"><br/>
<input type="hidden" name = "content">
<iframe id="olEditor" width="100%" height="400" SCROLLING ="yes"></iframe><br/>
<INPUT TYPE="button" value="提交" onclick="form1.content.value=olEditor.document.body.innerText;form1.submit();">
</FORM>
</BODY>
</HTML>
正文
HTML编辑器-框架做的表单2005-06-24 15:16:00
【评论】 【打印】 【字体:大 中 小】 本文链接:http://blog.pfan.cn/yang/2087.html
阅读(4912) | 评论(0)
版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!
评论