2019独角兽企业重金招聘Python工程师标准>>>

源:

<script type="text/javascript">var editor;KindEditor.ready(function(K) {editor = K.create('textarea[name="userinfo.introduce"]', {resizeType : 1,allowPreviewEmoticons : false,allowImageUpload : false,afterCreate : function() {var self = this;self.sync();K.ctrl(document, 13, function() {document.forms['addform'].submit();});K.ctrl(self.edit.doc, 13, function() {document.forms['addform'].submit();});},       items : ['fullscreen','source','preview','|','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist','insertunorderedlist', '|', 'emoticons', 'image', 'link']});});
</script>

HTML代码

<textarea name="userinfo.introduce" style="width:700px;height:200px;visibility:hidden;"></textarea>

这样子在后台的strts2的action中拿到的是空。

只有再加上这段语句才可以获得。

afterBlur:function(){ this.sync(); }

加上后:

<script type="text/javascript">var editor;KindEditor.ready(function(K) {editor = K.create('textarea[name="userinfo.introduce"]', {resizeType : 1,allowPreviewEmoticons : false,allowImageUpload : false,afterCreate : function() {var self = this;self.sync();K.ctrl(document, 13, function() {document.forms['addform'].submit();});K.ctrl(self.edit.doc, 13, function() {document.forms['addform'].submit();});},afterBlur:function(){ this.sync(); },       items : ['fullscreen','source','preview','|','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist','insertunorderedlist', '|', 'emoticons', 'image', 'link']});});
</script>

转载于:https://my.oschina.net/mcbeathtao/blog/75632

struts2 kindeditor teatarea拿不到值问题。相关推荐

  1. Struts2中EL表达式的取值范围问题

    Struts2中EL表达式的取值范围问题 在Struts2中对request进行了装饰,增强了getAttribute()方法,改变了EL该方法的查找范围,具体为,查找request域,不存在,查找值 ...

  2. KindEditor得不到textarea值的解决方法----摘至天涯

    以前有朋友遇到过这个问题,就是KindEditor在火狐下或者其他浏览器下都无法得到textarea文本框的值,点击表单提交按钮得到的是空白.昨天天涯PHP博客[http://blog.phpha.c ...

  3. struts2中把action中的值传递到jsp页面的例子

    例子: RegistAction的代码: package com.wss.action;import javax.servlet.http.HttpServletRequest;import org. ...

  4. 取KindEditor中的textarea的值区不到的解决方案,固定kindEditor的高度

     可以通过下面的方式取到textarea的值 var content = $(document.getElementsByTagName('iframe')[0].contentWindow.do ...

  5. struts2中action的class属性值意义

    整合了spring就不同了,orz struts2单独使用时action由struts2自己负责创建:与spring集成时,action实例由spring负责创建(依赖注入).这导致在两种情况下str ...

  6. struts2的注入参数,获取值

    首先要配置struts.xml 名字一定是这个,放在src目录下才生效 <?xml version="1.0" encoding="UTF-8" ?> ...

  7. 【kindeditor】KindEditor获取多个textarea文本框的值并判断非空

    kindeditor官网:http://kindeditor.net/demo.php 如何获取多个KindEditor中textarea文本框的值,方式很多种(带有HTML标签). var intr ...

  8. Struts2中EL表达式取值

    http://blog.csdn.net/cuihaiyang/article/details/41950141 (写的不错,可以知道为什么struts2可以用El取属性值的问题.正常el从reque ...

  9. Struts2框架--学习笔记(下):OGNL表达式、值栈操作、拦截器、struts2标签、文件上传

    一.OGNL概述:OGNL是一种表达式 (1)在struts2中操作值栈数据. (2)一般把ognl在struts2中操作,和struts2标签一起使用操作值栈. (3)ognl不是strut2的一部 ...

最新文章

  1. ​Leangoo在线SaaS模式的产品结构
  2. No loop matching the specified signature and casting
  3. XHTML 结构化:使用 XHTML 重构网站
  4. Redis-17Redis内存回收策略
  5. ubuntu卸载nvidia驱动_解决Ubuntu18.04循环登录问题 - 卸载NVIDIA驱动 启用Nouveau(1)
  6. Angular页面在开发模式(DevMode)下的ng-reflect-属性是如何生成的
  7. 进程与线程的区别(面试题)
  8. php laravel 优点,Laravel 特点有哪些?
  9. Python-又到了抢票的季节(带验证码识别验证)
  10. Bootstrap3 滚动监听插件的选项
  11. 苹果x屏幕出现一条绿线_部分用户反映苹果 iPhone 12 屏幕出现划痕 - iPhone 12
  12. Linux学习总结(七十四)自动化运维之ansible
  13. python做后端速度慢吗_【后端开发】python如何提高运行速度
  14. Cisco WebEx设备ssl证书安装指南
  15. 雨滴网易云播放器html代码,【问题求助】这种代码的播放器怎么关联网易云?...
  16. pointcloud90度分割+球面投影(pcl+ros+python)
  17. OLED之U8g2中文库使用
  18. 以太网协议------802.1q,802.1d,802.1x
  19. 谷歌html弹出ie页面,HTML用JS识别浏览器,IE内核则调用谷歌打开指定链接
  20. 随机码生成器[10位字母+数字]

热门文章

  1. 配置SSH非管理员用户登录
  2. Cocos2D中相关问题提问的几个论坛
  3. MySQL外键创建失败1005原因总结
  4. js将时间戳格式化为HH:ii:ss的格式
  5. 01: 实现注册登录功能
  6. 详解go语言的array和slice 【二】
  7. 【转】学会这13个原则写UI界面文案,用户才能秒懂
  8. DataGirdView 常用操作
  9. APP开发者到期续费说明
  10. 终于收到HacktoberFest的奖品啦