<!doctype html> <html> <head> <meta charset="utf-8" /> <title>Simple Examples</title> <style> form { margin: 0; } textarea { display: block; } </style> <script charset="utf-8" src="kindeditor/kindeditor-all-min.js"></script> <script charset="utf-8" src="kindeditor/lang/zh-CN.js"></script> <script> var editor; KindEditor.ready(function(K) { editor = K.create('textarea[name="content"]', { resizeType : 1, allowPreviewEmoticons : false, allowImageUpload : false, items : [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'emoticons', 'image', 'link'] }); }); </script> </head> <% response.write request("content") %> <body> <h3>默认模式</h3> <table> <form> <textarea name="content" style="width:700px;height:200px;visibility:hidden;">KindEditor</textarea> <input type="submit" value="提交" /> </form> </table> </body> </html>以上代码使用时怎么也获取不到值,研究了一两个小时才发现,原来form只要放在table内就无效,解决方法是form放到最外层,使之里面没有table标签。
KindEditor使用过程中遇到的一个诡异的问题:form放在table中就失效
猜你喜欢
转载自blog.csdn.net/sysdzw/article/details/79394768
今日推荐
周排行