然后在需要的地方用该格式"PowerPoint.aspx?文件名"调用该模板页,就可以实现!并且不会出现因在ie里打开ppt而出现的下载框.<script language="javascript" type ="text/javascript"> String.prototype.trim = function()//增加一个去掉前后空格的TRIM函数 { return this.replace(/(^\s*)|(\s*$)/g,""); } var fullPath = window.location.href.toString(); var fileNameArr = new Array(); var fileName = ""; fileNameArr = fullPath.split('?'); fileName = fileNameArr[1]; if (fileName == undefined) { alert ("错误:参数格式不正确!\n(参数格式:PowerPoint.aspx?文件名)"); window.opener = null; window.close(); } else { if (fileName.trim() == "") { alert ("错误:参数不能为空!\n(参数格式:PowerPoint.aspx?文件名)"); window.opener = null; window.close(); } else { win=window.open(fileName,"","resizable=yes,scrollbars=no,status=yes,toolbar=0,menubar=1,location=no,fullscreen=0"); win.moveTo(0,0); win.resizeTo(screen.availWidth,screen.availHeight); window.opener=null; window.close(); } } </script>
联系客服