zoukankan      html  css  js  c++  java
  • 加载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");     }    });    });

  • 相关阅读:
    leetcode 5286 网格中的最短路径
    C++ STL
    Transformer解读
    global_steps
    tensorflow中的一些语法问题
    生成器与yield关键字
    CNN神经网络一维卷积和二维卷积
    electron-builder打包后,运行的程序左上角图标不显示,桌面和状态栏的显示正常,是什么情况。
    git慢设置代理
    js使用正则表达式获取字符串中特定的字符
  • 原文地址:https://www.cnblogs.com/cuijinlong/p/6554372.html
Copyright © 2011-2022 走看看