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");     }    });    });

  • 相关阅读:
    acdream.18.KIDx's Triangle(数学推导)
    upc.2219: A^X mod P(打表 && 超越快速幂(in some ways))
    山东省第四届acm.Rescue The Princess(数学推导)
    BC.5200.Trees(dp)
    BC.36.Gunner(hash)
    hdu.5195.DZY Loves Topological Sorting(topo排序 && 贪心)
    数组倒置算法扩展
    C# 传值和传引用 ( ref out in )
    C# 输出文件夹下的所有文件
    控制反转(自译)
  • 原文地址:https://www.cnblogs.com/cuijinlong/p/6554372.html
Copyright © 2011-2022 走看看