ITeye博客

点聚weboffice学习

wkj1209 · 2012-02-16 14:10 · Java · javascript · Web前端 · Markdown

javascript方法示例

/****************************************************
*
*					上传文档
*
/****************************************************/
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格式

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。