教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 PHP网页中Ewebeditor编辑器嵌入方法

PHP网页中Ewebeditor编辑器嵌入方法

发布时间:2016-10-26   编辑:jiaochengji.com
教程集为您提供PHP网页中Ewebeditor编辑器嵌入方法等资源,欢迎您收藏本站,我们将为您提供最新的PHP网页中Ewebeditor编辑器嵌入方法资源
在php中我们经常会使用各种编辑器,下面我来介绍在PHP网页中Ewebeditor编辑器嵌入代码,各位同学可参考。

下载“Ewebeditor”PHP编辑器。
1在 </head> 之前加上下面一段代码:(得到 ewebeditor 中编辑的内容)

<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy5326')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy5326>

<script>
function checkForm()
{
document.form1.content .value = window.ewebeditor .getHTML();
************getHTML() 获得编辑区内容
************ 此处的名字 ewebeditor 要与 iframe 中的 name="ewebeditor" 相同
************content.value 也要与 content 中的 <input > 中相对应
}
</script>

(2)下面一段代码是把 ewebeditor 嵌入到网页中:
 

<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy6843')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy6843><input type="hidden" name="content" id="content" value ="">
**********id="content" 中的 content 要与 <iframe> 中的 id=content 相同!
<iframe id="ewebeditor" name="ewebeditor" src="ewebeditor/ewebeditor.php?id=content " frameborder="0" scrolling="no" width="100%" HEIGHT="450">
</iframe>

您可能感兴趣的文章:
PHP网页中Ewebeditor编辑器嵌入方法
php编程是什么意思?
为什么不把html文件写在php中
php和css一样吗
学好PHP,try your best
php文件有什么用
PHP使用函数的优势有哪些?
PHP是什么文件?怎么打开?
php属于编程语言吗
php语言怎么读

[关闭]
~ ~