关于jsp使用兼容版kindeditor编辑器的方法.docx

上传人:b****1 文档编号:1784858 上传时间:2023-05-01 格式:DOCX 页数:19 大小:136.18KB
下载 相关 举报
关于jsp使用兼容版kindeditor编辑器的方法.docx_第1页
第1页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第2页
第2页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第3页
第3页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第4页
第4页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第5页
第5页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第6页
第6页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第7页
第7页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第8页
第8页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第9页
第9页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第10页
第10页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第11页
第11页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第12页
第12页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第13页
第13页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第14页
第14页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第15页
第15页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第16页
第16页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第17页
第17页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第18页
第18页 / 共19页
关于jsp使用兼容版kindeditor编辑器的方法.docx_第19页
第19页 / 共19页
亲,该文档总共19页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

关于jsp使用兼容版kindeditor编辑器的方法.docx

《关于jsp使用兼容版kindeditor编辑器的方法.docx》由会员分享,可在线阅读,更多相关《关于jsp使用兼容版kindeditor编辑器的方法.docx(19页珍藏版)》请在冰点文库上搜索。

关于jsp使用兼容版kindeditor编辑器的方法.docx

关于jsp使用兼容版kindeditor编辑器的方法

jsp关于使用兼容版kindeditor编辑器的方法

备注:

js能取值,修改能改值

1、增加页面调用add.jsp

《如图》代码在下

<%@pagecontentType="text/html;charset=GBK"errorPage="../error.jsp"%>

<%@pageimport="zr.zrpower.ewebeditor.fileService.FileManageService"%>

<%@pageimport="zr.zrpower.entity.sys.SessionUser"%>

<%@pageimport="zr.zrpower.ejb.sys.UIService"%>

<%@pageimport="java.util.*"%>

<%@pageimport="java.text.*"%>

<%

FileManageServicefileManage=newFileManageService();

UIServiceuserUI=newUIService();

SessionUseruser=(SessionUser)session.getAttribute("userinfo");

Stringstate=request.getParameter("state");

StringstrRECORDID=request.getParameter("RECORDID");

if(strRECORDID==null){strRECORDID="";}

if(strRECORDID.length()==0)

{

strRECORDID=fileManage.GlobalID("");//生成附件编号

}

%>

文章添加

//编辑器应用开始

functiondoCheck(){

//检测表单的有效性

//如:

标题不能为空,内容不能为空,等等....

if(eWebEditor1.getHTML()==""){

alert("内容不能为空!

");

return;

}

//表单有效性检测完后,自动上传远程文件

//函数:

remoteUpload(strEventUploadAfter)

//参数:

strEventUploadAfter;上传完后,触发的函数名,如果上传完后不需动作可不填参数

eWebEditor1.remoteUpload();

}

//有效性检察

functionCheck(theForm){

alert(theForm.content.value);

if(theForm.content.value!

=""){

theForm.FCONTENT.value=theForm.content.value;

}

if(trim(theForm.TITLE1.value)==""){

alert("文章标题不能为空!

");

theForm.TITLE1.focus();

return;

}

if(theForm.TITLE1.value.length>100){

alert("文章标题长度不能超过100!

");

theForm.TITLE1.focus();

return;

}

if(theForm.TITLE2.value.length>100){

alert("文章副标题长度不能超过100!

");

theForm.TITLE2.focus();

return;

}

if(theForm.FSOURCE.value.length>100){

alert("文章来源长度不能超过100!

");

theForm.FSOURCE.focus();

return;

}

if(theForm.KEYWORDS.value.length>100){

alert("文章关键字长度不能超过100!

");

theForm.KEYWORDS.focus();

return;

}

if(theForm.AUTHOR.value.length>100){

alert("文章作者长度不能超过100!

");

theForm.AUTHOR.focus();

return;

}

if(theForm.content.value==""){

alert("内容不能为空!

");

return;

//returnfalse;

}

document.form1.submit();

}

<%

StringID=fileManage.GetMaxFieldNo();

Calendarcal=Calendar.getInstance();

SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-ddHH:

mm:

ss");

StringmDateTime=formatter.format(cal.getTime());

%>

'/>

'/>

'/>

'/>

">

 

--HTMLHead-->

 

--HTMLHead表单头显示[显示内容,用户肤色的图片文件夹]-->

<%=userUI.ShowHeadHtml("公共文件管理",user.getUserImage())%>

--HTMLBodyStart显示表单开始部分-->

<%=userUI.ShowBodyStartHtml()%>

 

absolute;width:

100%;height:

100%;overflow:

auto'>


 

98%">

新建文章

文章标题:

 *

文章副标题:

文章来源:


审核:

作者:

''">

文章内容:

none">

 

''">

<%--编辑器开始--%>

96%;height:

350px;visibility:

hidden;">

<%--编辑器结束--%>

FLOWID=mail&DOCID=<%=strRECORDID%>&AID=mail&TYPE=1"border=0frameborder=0width=100%height=100%>



<%=userUI.ClickButton("远程采集","JavaScript:

getContent();","buttonSave.gif",user.getUserImage())%>

<%=userUI.ClickButton("保存","JavaScript:

Check(form1);","buttonSave.gif",user.getUserImage())%>

<%=userUI.ClickButton("重填","JavaScript:

document.form1.reset();","buttonReset.gif",user.getUserImage())%>

<%=userUI.ClickButton("返回","JavaScript:

history.back();","buttonReturn.gif",user.getUserImage())%>


 

--HTMLFoot显示表单尾-->

<%=userUI.ShowFootHtml()%>

<%

//清空相关对象(强制让java释放资源)

user=null;

userUI=null;

fileManage=null;

%>

2、编辑页面调用edit.jsp

《图如下》

<%@pagecontentType="text/html;charset=GBK"errorPage="../error.jsp"%>

<%@pageimport="zr.zrpower.ewebeditor.fileService.FileManageService"%>

<%@pageimport="zr.zrpower.entity.sys.SessionUser"%>

<%@pageimport="zr.zrpower.web.model.BPIP_GFILE"%>

<%@pageimport="zr.zrpower.ejb.sys.UIService"%>

<%@pageimport="java.util.*"%>

<%@pageimport="java.text.*"%>

<%

FileManageServicefileManage=newFileManageService();

UIServiceuserUI=newUIService();

SessionUseruser=(SessionUser)session.getAttribute("userinfo");

StringID=request.getParameter("SelectedItems");

BPIP_GFILEbg=fileManage.getFile(ID);

StringstrReturn=request.getParameter("return");

StringstrRECORDID=bg.getFILEID();

%>

//编辑器应用开始

functiondoCheck(){

//检测表单的有效性

//如:

标题不能为空,内容不能为空,等等....

if(eWebEditor1.getHTML()==""){

alert("内容不能为空!

");

return;

}

//表单有效性检测完后,自动上传远程文件

//函数:

remoteUpload(strEventUploadAfter)

//参数:

strEventUploadAfter;上传完后,触发的函数名,如果上传完后不需动作可不填参数

eWebEditor1.remoteUpload();

}

//有效性检察

functionCheck(theForm){

alert(theForm.content.value);

if(theForm.content.value!

=""){

theForm.FCONTENT.value=theForm.content.value;

}

if(trim(theForm.TITLE1.value)==""){

alert("文章标题不能为空!

");

theForm.TITLE1.focus();

return;

}

if(theForm.TITLE1.value.length>100){

alert("文章标题长度不能超过100!

");

theForm.TITLE1.focus();

return;

}

if(theForm.TITLE2.value.length>100){

alert("文章副标题长度不能超过100!

");

theForm.TITLE2.focus();

return;

}

if(theForm.FSOURCE.value.length>100){

alert("文章来源长度不能超过100!

");

theForm.FSOURCE.focus();

return;

}

if(theForm.KEYWORDS.value.length>100){

alert("文章关键字长度不能超过100!

");

theForm.KEYWORDS.focus();

return;

}

if(theForm.AUTHOR.value.length>100){

alert("文章作者长度不能超过100!

");

theForm.AUTHOR.focus();

return;

}

if(theForm.content.value==""){

alert("内容不能为空!

");

return;

//returnfalse;

}

document.form1.submit();

}

<%

Calendarcal=Calendar.getInstance();

SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-ddHH:

mm:

ss");

StringmDateTime=formatter.format(cal.getTime());

%>

'/>

'/>

'/>

'/>

">

--HTMLHead-->

--HTMLBodyStart显示表单开始部分-->

<%=userUI.ShowBodyStartHtml()%>

 

absolute;width:

99%;height:

100%;overflow:

auto'>


 

98%">

编辑文章

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 农林牧渔 > 林学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2