js 获取FCK的值并赋值

<script language="javascript">
function check(key)
{
    var myself = FCKeditorAPI.GetInstance("mySeft").GetXHTML(true);
    var my = "请简要的填写您的自我介绍。字数在200字以内!!";
    if(key==0)
    {
        if(myself==my)
        {
            FCKeditorAPI.GetInstance("mySeft").SetHTML("");
            return false;
        }
    }else if(key==1)
    {
        if(myself=="" || myself=="<br>")
        {
FCKeditorAPI.GetInstance("mySeft").EditorDocument.body.innerHTML ="请简要的填写您的自我介绍。字数在200字以内!!";
           return false;
}
}
</script>
jsp页面


<div onmouseover="check(0);" onmouseout="check(1);"><FCK:editor id="mySeft"  basePath="/FCKeditor/" height="200" width="780" toolbarSet="Simple">
<ww:if test="jobCn==null">请简要的填写您的自我介绍。字数在200字以内!!</ww:if> ${jobCn.mySeft}</FCK:editor></div>

你可能感兴趣的:(jsp)