日期:2014-05-17 浏览次数:20470 次
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="WebApplicationTest.Test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>TestPage</title> <script type="text/javascript" language="javascript" src="kindeditor-3.5.1-zh_CN/kindeditor.js"></script> <script type="text/javascript"> KE.show({ id: 'content', afterCreate: function (id) { KE.event.ctrl(document, 13, function () { KE.util.setData(id); document.forms['example'].submit(); }); KE.event.ctrl(KE.g[id].iframeDoc, 13, function () { KE.util.setData(id); document.forms['example'].submit(); }); } }); function check() { /*var content=document.getElementById("content"); alert(content.value);*/ alert(KE.util.getData('content')); //提交内容 } </script> </head> <body> <form name="example" method="post" action=""> <div class="editor"> <textarea id="content" name="content" style="width:700px;height:400px;visibility:hidden;"></textarea> </div> <input type="button" name="button" value="取得内容" onclick="javascript:alert(KE.util.getData('content'));" /> <input type="button" name="button" value="取得纯文本" onclick="javascript:alert(KE.util.getPureData('content'));" /> <input type="submit" name="button" onclick="check()" value="提交内容" /> (提交快捷键: Ctrl + Enter) </form> </body> </html>