东莞seo建站优化方法,哪个建设网站好,视频网站怎么做统计,网页优化方法需要的资源包我放我资源里了#xff0c;不要积分
https://download.csdn.net/download/wybshyy/88245895
首先把FredCK.FCKeditorV2.dll添加到引用
具体方法如下#xff0c;一个是客户端版本#xff0c;一个是服务器端版本
客户端版本#xff1a;
% Page Language…需要的资源包我放我资源里了不要积分
https://download.csdn.net/download/wybshyy/88245895
首先把FredCK.FCKeditorV2.dll添加到引用
具体方法如下一个是客户端版本一个是服务器端版本
客户端版本
% Page LanguageC# AutoEventWireuptrue CodeBehindCaseTemplate_ADD.aspx.cs InheritsMyProject.CaseTemplate_ADD %
!DOCTYPE htmlhtml xmlnshttp://www.w3.org/1999/xhtml
head runatservermeta http-equivContent-Type contenttext/html; charsetutf-8 /title编辑/titlelink href/JS/layui/css/layui.css?v1.0 relstylesheet /link href/layuiadmin/style/admin.css?v1.0 relstylesheet /script src/JS/jquery-3.4.1.js?v1.0/scriptscript src/layuiadmin/layui/layui.js?v1.0/scriptscript src/layuiadmin/lib/admin.js?v1.0/scriptscript src/JS/layui/layui.js?v1.0/scriptscript src/kfckeditor/fckeditor.js?v1.0/script/head
bodydiv classlayui-fluiddiv classlayui-carddiv classlayui-card-body stylepadding: 15px;form classlayui-form actiondiv classlayui-form-itemlabel classlayui-form-label名称/labeldiv classlayui-input-blockinput typetext idnames lay-verifynames autocompleteoff placeholder请输入名称 classlayui-input value%strNames % //div/divdiv classlayui-form-itemlabel classlayui-form-label模板内容/labeldiv classlayui-input-blockscript typetext/javascriptvar fckeditor new FCKeditor(FCKeditor1);//新建一个fckeditor实例fckeditor.BasePath /kfckeditor/;//设置编辑器的位置,该位置一定要以/结尾这个basepath是指 fckeditor文件夹下所有文件的地址默认值是这个但是我们一般前面还要加上工程的名字如/prj/fckeditor/这样fckeditor.Create();//创建并且调用一个fckeditor编辑器/script/div/div/formdiv classlayui-form-item layui-layout-admindiv classlayui-input-blockdiv classlayui-footer styleleft: 0;button classlayui-btn sim_btn提交/buttoninput typebutton idbtnReset classlayui-btn layui-btn-primary value重置 //div/div/div/div/div/divinput typehidden idhdid value%strid % /script typetext/javascript//这里一定要设置全局变量不然下面用的时候未定义var layer, form, laypage, laydate, upload, layedit, indexs01, indexs02, indexs03;$(function () {layui.use([index, layer, form, laypage, laydate, upload, jquery, layedit], function () {layer layui.layer;form layui.form;laypage layui.laypage;laydate layui.laydate;upload layui.upload;layedit layui.layedit;//注册layeditvar $ layui.jquery;});//提交表单$(body).on(click, .sim_btn, function () {saveData();});});function saveData() {var errorMsg ;var id $(#hdid).val();var names $(#names).val();//var contents $(#xEditingArea).html();////var oEditor FCKeditorAPI.GetInstance(FCKeditor1);var oEditor FCKeditorAPI.GetInstance(FCKeditor1);alert(oEditor.GetXHTML(true));//获取FCK编辑器里的值alert(FCKeditor1);alert(FCKeditor1___Config);return false;if (names ) {errorMsg 请输入名称;}//if (names ) {// errorMsg 请输入姓名;FCKeditor1 FCKeditor1___Config//}if (errorMsg ! ) {layer.msg(errorMsg, { icon: 7 });return false;}loadIndex layer.load(0);var url /CaseTemplate_ADD.aspx;$.ajax({type: POST,url: url,dataType: JSON,data: { action: SaveData, id: id, typeID: typeID, names: names, links: links, isShow: isShow, orderNum: orderNum },success: function (result) {if (result.State) {layer.close(loadIndex);layer.msg(操作成功, { time: 1000 });setTimeout(closeRefresh, 1000);//关闭当前iframe刷新指定iframe}else {layer.msg(result.ErrorMsg, { time: 3000 });}}, complete: function (result) {layer.close(loadIndex);}});}/script
/body
/html服务器端
先在配置文件里配置好再把资源包放项目里
appSettings add keyFCKeditor:BasePath value~/kfckeditor// add keyFCKeditor:UserFilesPath value~/Files//
/appSettings
代码
% Page LanguageC# AutoEventWireuptrue CodeBehindTest02.aspx.cs InheritsMyProject.Test02 %
% Register AssemblyFredCK.FCKeditorV2 NamespaceFredCK.FCKeditorV2 TagPrefixFCKeditorV2 %
!DOCTYPE htmlhtml xmlnshttp://www.w3.org/1999/xhtml
head runatserver
meta http-equivContent-Type contenttext/html; charsetutf-8/title/title
/head
bodyform idform1div0000FCKeditorV2:FCKeditor IDFCKeditor1 runatserver Height480px/FCKeditorV2:FCKeditor/div/form
/body
/html取值后台用FCKeditor1.value就可以了提交按钮必须要加runatserver