利用wangEditor获取文章格式和内容
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <link href="wangEditor-master/dist/css/wangEditor.min.css" rel="stylesheet" /> <style> #div1 { width:50%; height:500px; } //设置宽度 .wangEditor-container { width:50% !important; margin-left:30% !important; height:300px; } </style> </head> <body> <form id="form1" runat="server"> <div id="div1" > <p>请输入内容。。。。</p> </div> <input id="button" type="button" value="提交" /> <script src="wangEditor-master/dist/js/lib/jquery-1.10.2.min.js"></script> <script src="wangEditor-master/dist/js/wangEditor.min.js"></script> <script> $(function () { var editor = new wangEditor('div1'); editor.create(); }) </script> </form> </body> </html> <script> $("#button").click(function () { var a = $("#div1").html(); alert(a); }); </script>