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