当前位置: 首页 > news >正文

九亭做网站公司免费注册qq号网站

九亭做网站公司,免费注册qq号网站,做二手回收哪个网站好,网页版传奇下载首先#xff0c;去官网下载最新版的kindeditor#xff0c;然后把里面asp#xff0c;jsp#xff0c;net#xff0c;example的全删除#xff0c;然后改名为editor放进public#xff08;最外层目录的public#xff09;文件夹里面 在目录lib目录建立ORG文件夹#xff08;个…  首先去官网下载最新版的kindeditor然后把里面aspjspnetexample的全删除然后改名为editor放进public最外层目录的public文件夹里面      在目录lib目录建立ORG文件夹个人习惯用ORG存储公用类建立一个共用类editor.class.php 下面是这个类的具体代码    ?php /*编辑器调用的初始化类  *  */ class editor { var $Width; var $Height; var $Value; /* 此方法是编辑器的构造方法  *第一个参数$Height是高度不填默认是500px  *第二个参数$Width是宽度不填默认是700px  *第三个参数$Value是编辑器默认内容不填默认是“h2欢迎使用编辑器/h2br”  *  */ function editor($Height500px,$Width700px,$Valueh2欢迎使用编辑器/h2br) { $this-Value  $Value; $this-Height  $Height; $this-Width  $Width; }     /*此方法是在线编辑器的调用  * 在需要编辑器的地方调用此函数  */ function createEditor(){ return textarea namecontent1 stylewidth:$this-Width;height:$this-Height;visibility:hidden;$this-Value/textarea; }   /*使用在线编辑器必须在htmlhead/head之间调用此方法才能正确调用  * 内容主要都是script  */ function usejs(){ $streot link relstylesheet href__PUBLIC__/editor/themes/default/default.css / link relstylesheet href__PUBLIC__/editor/plugins/code/prettify.css / script charsetutf-8 src__PUBLIC__/editor/kindeditor.js/script script charsetutf-8 src__PUBLIC__/editor/lang/zh_CN.js/script script charsetutf-8 src__PUBLIC__/editor/plugins/code/prettify.js/script script KindEditor.ready(function(K) { var editor1  K.create(textarea[namecontent1], { cssPath : __PUBLIC__/editor/plugins/code/prettify.css, uploadJson : __PUBLIC__/editor/php/upload_json.php, fileManagerJson : __PUBLIC__/editor/php/file_manager_json.php, allowFileManager : true, afterCreate : function() { var self  this; K.ctrl(document, 13, function() { self.sync(); K(form[nameexample])[0].submit(); }); K.ctrl(self.edit.doc, 13, function() { self.sync(); K(form[nameexample])[0].submit(); }); } }); prettyPrint(); }); /script eot; return $str; }   /*取得在线编辑器的值并返回  */  function getEditorContent(){     $htmlData  ;    if (!empty($_POST[content1])) { if (get_magic_quotes_gpc()) { $htmlData  stripslashes($_POST[content1]); } else { $htmlData  $_POST[content1]; } return $htmlData;    }  }   } 代码注释都写的比较清楚了然后在action建立个文件是IndexAction.class.php ?php class IndexAction extends Action { public function _initialize() {        header(Content-Type:text/html; charsetutf-8); }       public function index(){      import(.ORG.editor);  //导入类     $editornew editor();     //创建一个对象 $a$editor-createEditor();   //返回编辑器 $b$editor-usejs();             //js代码 $this-assign(usejs,$b);     //输出到html         $this-assign(editor,$a);         $this-display();             }     public function php(){     import(.ORG.editor);     $editornew editor();        $a$editor-getEditorContent();   //获取编辑器的内容 $this-assign(a,$a); $this-display(); // $this-success(数据添加成功);     } }   然后在tpl建立index文件夹在里面建立2个html文件 index.html    //使用编辑器 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html head meta http-equivContent-Type contenttext/html; charsetUTF-8 titleInsert title here/title    {$usejs} /head body form nameexample methodpost action__URL__/php ?php //textarea namecontent1 stylewidth:700px;height:200px;visibility:hidden;/textarea   ?         {$editor} br / input typesubmit namebutton value提交内容 / (提交快捷键: Ctrl  Enter) /form /body /html   php.html    //获取编辑器的内容 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html head meta http-equivContent-Type contenttext/html; charsetUTF-8 titleInsert title here/title /head body {$a} /body /html
http://www.huolong8.cn/news/68269/

相关文章:

  • 安徽省住建厅网站建设梧州网站推广方案
  • wordpress商城功能seo培训多少钱
  • 枫泾网站建设网站图片模板源码
  • 新开网站数据库修改wordpress登录密码
  • 网站模板网站网站建设如何使图片翻转
  • 个人网站的名称网络营销理论主要包括
  • 怎样做自己的 优惠卷网站网站建设制作ppt
  • 吐鲁番市网站建设我的企业网站怎么seo
  • 网站数据库空间深圳科技公司排名100
  • 门户网站集群建设网站开发需求分析的内容
  • 代码库网站搜狗引擎网站收录
  • 网站模板助手网站开发iso9001
  • 西安网站开发培训价格网站建设代码编译的问题及解决方案
  • 自己买一台服务器做自己的网站百度手机网站生成
  • 百货网站建设seo关键词分析
  • 做暖视频网站免费营销技巧
  • 顺德建设网站音乐网站源码带手机版
  • 网站运营和网络营销国内 响应式网站
  • 做视频网站违法asp.net做毕业设计网站
  • 代理公司注册网站最新军事新闻热点事件
  • 珠海微网站建设企业在线查询系统平台
  • 片头网站网站页面设计报价表
  • 怎么选择徐州网站开发郑州网站建设企业
  • 人才网网站建设方案wordpress 资讯模板
  • 建站行业新闻网站公告栏模板
  • php做的卖水果网站涟源seo快速排名
  • 江苏省建设工程网站沈阳工程建设信息网站电气监理
  • 南通专业网站建设公司绿化面积 建设网站
  • 做网站用什么程序比较好怎么做网站的301
  • 烟台网站建设联系企汇互联专业sydney wordpress