两个需要编辑的地方,只正常调用了一个
请问怎样修改
<script language="javascript" type="text/javascript" src="editor/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content' ) ;
oFCKeditor.Height = "400";
oFCKeditor.Width = "100%" ;
oFCKeditor.BasePath = '/editor/fckeditor/' ;
oFCKeditor.ReplaceTextarea() ;
}function fckAddText(txt)
{
var oEditor = FCKeditorAPI.GetInstance('content');
oEditor.InsertHtml(txt);
}window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content2' ) ;
oFCKeditor.Height = "400";
oFCKeditor.Width = "100%" ;
oFCKeditor.BasePath = '/editor/fckeditor/' ;
oFCKeditor.ReplaceTextarea() ;
}function fckAddText(txt)
{
var oEditor = FCKeditorAPI.GetInstance('content2');
oEditor.InsertHtml(txt);
}
</script>
请问怎样修改
<script language="javascript" type="text/javascript" src="editor/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content' ) ;
oFCKeditor.Height = "400";
oFCKeditor.Width = "100%" ;
oFCKeditor.BasePath = '/editor/fckeditor/' ;
oFCKeditor.ReplaceTextarea() ;
}function fckAddText(txt)
{
var oEditor = FCKeditorAPI.GetInstance('content');
oEditor.InsertHtml(txt);
}window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content2' ) ;
oFCKeditor.Height = "400";
oFCKeditor.Width = "100%" ;
oFCKeditor.BasePath = '/editor/fckeditor/' ;
oFCKeditor.ReplaceTextarea() ;
}function fckAddText(txt)
{
var oEditor = FCKeditorAPI.GetInstance('content2');
oEditor.InsertHtml(txt);
}
</script>
解决方案 »
- 【杭州】招聘2名 php开发工程师
- 关于discuz添加好友的问题,请帮忙,谢谢!
- Explanation: The Web server connection was closed.
- uploadify 为什么会两次插入数据?
- 问一个有关php的问题,就是怎么用一个在根目录php文件接收所有以域名开头的文件价格式的地址,然后处理。
- 求一个电扇网站的接口,急急急,在线等!
- 求助_关于微信接口上传图文素材时与html标签的冲突问题。
- thinkphp 根据无限极分类添加内容 小弟在线急求答案 跟写法
- memcached缓存一致性问题
- PHP微赞首页关于我们在哪里改,在线等!
- php如何实现记住密码的功能?
- IIS和apache共存时候域名如何绑定?
window.onload需要修改一下,因为后面的window.onload覆盖了前一个,代码修改如下:
<script language="javascript" type="text/javascript" src="editor/fckeditor/fckeditor.js"></script>
<script type="text/javascript">function create_fck(id)
{
var oFCKeditor = new FCKeditor(id) ;
oFCKeditor.Height = "400";
oFCKeditor.Width = "100%" ;
oFCKeditor.BasePath = '/editor/fckeditor/' ;
oFCKeditor.ReplaceTextarea() ;
}
window.onload = function()
{
create_fck('content');
create_fck('content2');
}function fckAddText1(txt)
{
var oEditor = FCKeditorAPI.GetInstance('content');
oEditor.InsertHtml(txt);
}function fckAddText2(txt)
{
var oEditor = FCKeditorAPI.GetInstance('content2');
oEditor.InsertHtml(txt);
}
</script>
函数名不能相同,否则以最后一个定义的函数为准