javascript方法示例
以上只为js的方法,下面是demo,还有weboffice的文档pdf格式
/****************************************************
*
* 上传文档
*
/****************************************************/
function SaveofficeFile(){
try{
var webObj=document.getElementById("WebOffice1");
webObj.HttpInit(); //初始化Http引擎
webObj.HttpAddPostString("mFileId", fileForm.fileId.value); //ID
webObj.HttpAddPostString("mfileType", fileForm.fileType.value); //附件类型
webObj.HttpAddPostCurrFile("webofficeFile",""); // 上传的文件
returnValue = webObj.HttpPost(basePath + "webOffice/updateManuscriptFile.action"); // 判断上传是否成功
if("succeed" == returnValue){
alert("稿件上传成功");
var webObj=document.getElementById("WebOffice1");
webObj.Close();
}else if("failed" == returnValue){
alert("稿件上传失败");
}
}catch(e){
alert("异常\r\nError:"+e+"\r\nError Code:"+e.number+"\r\nError Des:"+e.description);
}
}
以上只为js的方法,下面是demo,还有weboffice的文档pdf格式