---
title: "重置 FCKeditor 在TextArea中值"
author: "celine_q"
date: "2010-04-29T10:21:29Z"
tags: ["Firefox", "JavaScript", "fckeditor", "浏览器"]
categories: ["Web前端"]
slug: "fckeditor-textarea"
draft: false
lastmod: "2010-04-29T10:21:29Z"
id: 655880
url: "https://celineq.iteye.com/blog/655880"
---

IE6,7测试未通过(直接导致浏览器奔溃)，IE8,Firefox 3.6通过，进一步研究中

 

&lt;textarea rows="100" cols="200" name="content" id="content" value="${content.detail!}"&gt;${content.detail!}&lt;/textarea&gt;

 

&lt;input type="button" value="重置" name="reset1" onClick="resetForm(this.form)" class="buttonStyle" /&gt;

 

 

&lt;script language="javascript" &gt;

function resetForm(form){

    var oEditor = FCKeditorAPI.GetInstance('content');

    oEditor.SetHTML("");

    form.reset();

}

&lt;/script&gt;