当前位置: 首页 > 图文教程 > 网络编程 > ASP > 通过表单创建word的一个例子

ASP
ASP编程中15个非常有用的例子 (二)
ASP与JSP的比较(一)
ASP与JSP的比较(二)
ASP中五种连接数据库的方法
从ASP调用SQL中的图像
用排序串字段实现树状结构(例程:连接字串)
用排序串字段实现树状结构(例程:删除贴子)
用排序串字段实现树状结构(例程:回复表单)
用排序串字段实现树状结构(例程:显示贴子内容)
用排序串字段实现树状结构(例程:显示树)
用排序串字段实现树状结构(存储过程)
用排序串字段实现树状结构(库结构)
用排序串字段实现树状结构(原理)
remote script文档(转载自微软)(一)
remote script文档(转载自微软)(二)
remote script文档(转载自微软)(三)
remote script文档(转载自微软)(四)
remote script文档(转载自微软)(五)
remote script文档(转载自微软)(六)
remote script文档(转载自微软)(七)

ASP 中的 通过表单创建word的一个例子


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-14   浏览: 96 ::
收藏到网摘: n/a

  先创建一个表单,随便存一个名字好了。

  xxx.html
  〈form action="word_create.asp"〉
  Name: 〈input type="text" name="Name" size="50" maxlength="100"〉
  Email: 〈input type="text" name="Email" size="50" maxlength="100"〉
  Comments:
  〈textarea cols="50" rows="10" name="comments"〉〈/textarea〉
  〈input type="submit" value="Submit"〉
  〈/form〉

  处理表单的ASP程序

  word_create.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 %〉:
  我的EMAIL是: 〈%= stremail %〉
  我的内容是: 〈%= strComments %〉
  〈/body〉
  〈/html〉