頁面應用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>
JS代碼如下(需要引用JS):
var content = Question.getContent();當添加、修改、刪除傳值到.ashx頁面的時候 $.get("/plus/DetailsAdd.ashx", { action: "insert", content:escape(content), Id: id }, function (msg) {}
用escape方法傳值.
希望有所幫助。
新聞熱點
疑難解答