0
点赞
收藏
分享

微信扫一扫

.Net 下对 FCKeditor Js提取,后台Request.Form提取[原创]

DYBOY 2022-08-29 阅读 80

控件:

<%@ Register TagPrefix="fckeditorv2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>

<FCKeditorV2:FCKeditor id="FCKeditor1" runat="server"></FCKeditorV2:FCKeditor>cs: protected FredCK.FCKeditorV2.FCKeditor FCKeditor1;
代码:
<script type="text/javascript" src="http://www.cn.com/fckeditor.js"></script>
<script language = "JavaScript">

function CheckForm()

{

var oEditor = FCKeditorAPI.GetInstance('<%=this.FCKeditor1.ClientID%>');

document.getElementById("oEdit").value = oEditor.GetHTML();

oEditor.SetHTML("fdsfa");

return true;

}

</script>form的 onSubmit="return CheckForm();"
<input type="hidden" id="oEdit" name="oEdit" value="" />

后台

Request.Form["oEdit"].ToString()
其他:

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

为获取其内容

oEditor.SetHTML("工作队");

为设置其内容

头文件加入 ValidateRequest="false" 就不会出现危险字符了.

 

---------------------------------------------
生活的意义并不是与他人争高下,而在于享受努力实现目标的过程,结果是对自己行动的嘉奖。
↑面的话,越看越不痛快,应该这么说:

生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!

新博客 ​​​https://www.VuejsDev.com​​ 用于梳理知识点



举报

相关推荐

0 条评论