国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

ueditor+asp.net異步提交,可以實(shí)現(xiàn)了,嘿嘿

2019-11-14 16:51:53
字體:
供稿:網(wǎng)友
之前沒用過Ueditor去異步提交,最近項(xiàng)目需要用到這個,就下了個來用,結(jié)果可能沒仔細(xì)去看Ueditor的相關(guān)介紹文檔,然后自己也郁悶了一下才把它弄出來,現(xiàn)在可以實(shí)現(xiàn)異步提交了,松口氣,把代碼貼出來,以備參考!如果哪里寫得不好,請幫我指出來哦,謝謝!
 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" ValidateRequest="false"
    Inherits="Webapplication2.CommunityAdmin.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></title>
    <scrjavascript" src="ueditor/editor_all_min.js"></script>
    <script type="text/Javascript" src="ueditor/editor_config.js"></script>
    <link rel="Stylesheet" href="ueditor/themes/default/ueditor.CSS" />
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.min.js"></script>
</head>
<body>
    <script type="text/javascript">
        var editor = new UE.ui.Editor();//實(shí)例
        editor.render('myeditor');//渲染編輯器
        $(function () {
 
 
            $("#btn").click(
        function () {
            var nn = editor.getContent();
 
            editor.sync();//這一句至關(guān)重要,沒有它,甭想異步提交了
 
            $.Ajax(
            {
                url: "Handler1.ashx",
                type: "post",
                data: "wenben=" + nn,
                success: function (data) {
 
                    alert(data);
 
                }
 
            }
            );
        });
 
        });
    </script>
    <textarea name="mycontent" rows="" cols="" id="myeditor"> </textarea>
    <input type="button" id="btn" />
 
</body>
</html>
 
 
 
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
Handler1.ashx.cs
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
namespace WebApplication2.CommunityAdmin
{
    /// <summary>
    /// Handler1 的摘要說明
    /// </summary>
    public class Handler1 : IHttpHandler
    {
 
        public void ;

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 临夏市| 山阳县| 云龙县| 鄂州市| 儋州市| 会泽县| 伊宁县| 磐安县| 同德县| 巴中市| 普宁市| 繁昌县| 阜新| 永顺县| 昌平区| 苍山县| 屯留县| 惠东县| 兰考县| 安塞县| 镇宁| 望江县| 开封市| 来凤县| 信丰县| 宁都县| 仙桃市| 柏乡县| 无极县| 波密县| 铜山县| 呼图壁县| 信丰县| 昭觉县| 鹤岗市| 纳雍县| 龙川县| 威远县| 安多县| 石嘴山市| 安泽县|