现在项目中要求有一个在线打开、编辑、保存服务器上的doc文档的功能,开发环境是php,在网上看到用js可以控制,我写了下面的代码就是没效果啊?是不是php里面还有什么没配置好啊?请高手指教,谢谢!function openword(url){
var openDocObj;
try{
openDocObj = new ActiveXObject("SharePoint.OpenDocuments.3");
}catch(e){
try{
openDocObj = new ActiveXObject("SharePoint.OpenDocuments.2");
}catch(e){
try{
openDocObj = new ActiveXObject("SharePoint.OpenDocuments.1");
}catch(e){
openDocObj=null;
}
}
}
if(openDocObj){
openDocObj.EditDocument("http://localhost/"+url);
}else{
window.open("http://localhost/"+url);
}
}