在线编辑器的内容插入数据库的问题

<head>
<script language="javascript">
function subchk()
{
    document. questionAction.content.value= window.eWebEditor1.getPureHtml();
}
</script>
下面的是一个表单;
<s:form action="insertquestion" method="post" name="questionAction"
onsubmit="subchk()">

  内容:<textarea name="content" style="display:none"></textarea>
<IFRAME ID="eWebEditor1" src="ques/edit
.html"
frameborder="0"
scrolling="no" width="467" height="200"></IFRAME>

</s:form>

今天又犯了一个错误!!上面的是我用struts2+spring2.0+hibernate3.0做的一个小项目中在页面中嵌入了一个编辑器,刚开始我怎么也不能把content中的内容写到数据库!!每次插入数据库中的内容都是null;哈哈。。
仔细查找了一下。。原来在form表单中没有加 onsubmit="subchk()"。。真是晕死了!!还有form表单中的 name="questionAction"
要和function subchk()
{
    document. questionAction.content.value= window.eWebEditor1.getPureHtml();
}
</script>中的[color=red]questionAction[/color一致。起什么名字都可以,

你可能感兴趣的:(html)