你的位置:首页 > ASP.net教程

[ASP.net教程]CKEDITOR的内容js转码,C#控制器解码接收


1 <script type="text/javascript" src="<%=Url.Content("~/Resource/ckeditor/ckeditor.js") %>"></script><!--ckeditor-->2 3 <%=Html.TextAreaFor(Model=>Model.WORK_INTRODUCTION)%>4 <script type="text/javascript">5 CKEDITOR.replace('WORK_INTRODUCTION');6 </script>


ckeditor:

js转码:

1 escape(CKEDITOR.instances.WORK_INTRODUCTION.getData())

Control解码:

1 Convert.ToString(HttpUtility.UrlDecode(Request.Form["WORK_INTRODUCTION"]))

参考文章:http://www.jb51.net/article/32641.htm