用 asp 怎样实现在网页中打开word文档?

luweisuccess 2003-11-28 03:20:04
用 asp 怎样实现在网页中打开word文档?
...全文
219 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
woodwolf 2003-12-03
  • 打赏
  • 举报
回复
用IE打开WORD文档一般没问题,但怎么点击关闭时却总是提示出错呢?
aspczlover 2003-12-02
  • 打赏
  • 举报
回复
response.AddHeader "content-disposition", "inline; filename=dynamicbb.doc"
可以吗?
aspczlover 2003-12-02
  • 打赏
  • 举报
回复
我想问一下能否保存此word文档
aspczlover 2003-12-02
  • 打赏
  • 举报
回复
客户端装了WORD的话

<a href="www.doc" type="application/ms-word">word</a>


hxx986 2003-12-01
  • 打赏
  • 举报
回复
根据上面的代码,我们可以这样的简化:
docform.htm
<html>
<head>
<script language="JavaScript">
function daoexcel_onclick()
{
window.fm.submit();
}
</script>
</head>
<body>
<form action="doccreate.asp?get=get" method="post" name="fm" target="_blank">
<textarea name="aaa" style="WIDTH: 100%; HEIGHT: 100%" rows="20" cols="20">

</textarea>
<input type="submit" value="提交">
</form>
</body>
</html>


doccreate.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
Response.Expires = 0
Response.ContentType ="application/msword"
%>
</head>
<body>
<%
Response.Write Request("aaa")
%>
</body>
</html>
这样就可以,我们可以先从docform.htm的text文本框中输入内容,就可以打开doccreate.asp,的WORD文档了.
blueice2002 2003-12-01
  • 打赏
  • 举报
回复
如何通过表单创建一个Word?
举个例子吧,我们先创建一个表单文件docform.htm,再用ASP程序(doccreate.asp)来处理表单:
docform.htm
<form action="doccreate.asp">
姓名: <input type="text" name="Name" size="50" maxlength="100">
电子邮件: <input type="text" name="Email" size="50" maxlength="100">
<p>内容:<textarea cols="50" rows="10" name="comments"></textarea>
<input type="submit" value="提交"> <p>
</form>

doccreate.asp
<% Response.ContentType = "application/msword" %>
<html>
<% strName = Request.Querystring("Name")
strEmail = Request.Querystring("Email")
strComments = Request.Querystring("Comments")
%>

<head>
</head>
<body>
<p align="right"><%=formatdatetime(now,2)%></p>

<%= strname %>:
我的电子邮件是: <%= stremail %>
内容是: <%= strComments %>
</body>
</html>

xxsoft 2003-12-01
  • 打赏
  • 举报
回复
直接做个链接即可...客户端必须安装OFFICE哦..呵呵..
fangpeng2003 2003-12-01
  • 打赏
  • 举报
回复
客户端要装了WORD
say1no2 2003-12-01
  • 打赏
  • 举报
回复
做个链接指向这个文档就行了!
<a href="word/111.doc">Word文档</a>
sx1123 2003-11-28
  • 打赏
  • 举报
回复
response.redirect "fileName.doc"

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧