• 加载Editor


       <div id="contentDiv" style = " 98% ;height:100%; clear: both;margin-top: 10px;display:none;">
        <script id="content" name="content" type="text/plain" ></script>
       </div>

    $(function(){

       introduceEditor = UE.getEditor('content');
        var selectPath = '<%=request.getContextPath()%>/advertisement/selectAdvertHelp';
            $.post(selectPath,null,function(result)
              {
             if(result.success){
               $('#fm').form('load',result.advert);
                   $("#contentDiv").css("display","block");
              //Editor加载数据
               introduceEditor.ready(function(){
                   introduceEditor.setContent(result.advert.content);   
                  })
              
               
             }else{
              $.messager.alert('警告','查询错误!');
             }
             
            },'json');

    }

    查看去掉编辑框

    <body id='body'>

    </body>

     $(function() {    

       var selectPath = '<%=request.getContextPath()%>/advertisement/selectAdvertHelp';    

      $.ajax({    

       type : "GET",   

       url : selectPath,     

      data : null,     

      dataType : "json",     

      success : function(data) {    

        if (data.success == true) {       
        $("#body").append(data.help.content);

         } else {       

        $.messager.alert("操作提示", "操作失败!", "error");     

     }

        },     error : function() {      $.messager.alert("操作提示", "操作失败!", "error");     }    });    });

  • 相关阅读:
    1029 旧键盘 (20 分)
    1028 人口普查 (20 分)
    1026 程序运行时间 (15 分
    1025 反转链表 (25 分
    1024 科学计数法 (20 分
    1023 组个最小数 (20 分)
    将命令的输出保存到文件
    使用与管理控制台历史
    度量命令执行时间
    检查最后运行命令的状态
  • 原文地址:https://www.cnblogs.com/cuijinlong/p/6554372.html
Copyright © 2020-2023  润新知