---
title: "点聚weboffice学习"
author: "wkj1209"
date: "2012-02-16T14:10:21Z"
tags: []
categories: ["Web前端"]
slug: "weboffice"
draft: false
lastmod: "2012-02-16T14:11:47Z"
id: 1407972
url: "https://wangkejun.iteye.com/blog/1407972"
---

javascript方法示例

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