·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP.NET网站开发 >> Uediter的引用和取值

Uediter的引用和取值

作者:佚名      ASP.NET网站开发编辑:admin      更新时间:2022-07-23

页面应用Uediter控件,代码如下:

   

                        <tr>
                            <td align="center" class="xwnr_j">
                                <asp: TextBox ID ="txtContent" TextMode ="MultiLine" Height ="274px" Width ="95%" runat="server"></asp :TextBox>
                            </td>
                        </tr>
                        <script type="text/javascript">
                            var option = {};
                            var Question = new baidu.editor.ui.Editor(option);
                            Question.render( 'txtContent');
                        </script>
View Code

 

JS代码如下(需要引用JS):

var content = Question.getContent();
当添加、修改、删除传值到.ashx页面的时候
 $.get("/plus/DetailsAdd.ashx", { action: "insert", content:escape(content), Id: id }, function (msg) {
}
View Code

用escape方法传值.

希望有所帮助。