|
|
|
ASP生成静态htm页面基本代码!
作者: 来源: 点击: 日期:2007-12-01 |
|
<% filename="test.htm" if request("body")<>"" then set fso = Server.CreateObject("Scripting.FileSystemObject") set fout = fso.CreateTextFile(server.mappath(""&filename&"")) fout.write "标题(title):" & request.form("title") & "<br>" fout.write "内容(body):" & request.form("body") fout.close set fout=nothing set fso=nothing end if %> <form name="form1" method="post" action=""> <input name="title" size=18><br> <textarea name="body"></textarea> <br> <br> <input type="submit" name="Submit" value="生成"> </form>
-------------------------------------------------------------------------------- 然后在浏览器输入mk.asp这个页面,填写完毕后,就会生成test.htm这个文件,里面的内容就是你刚才填写的。
|
|
|
|
【文章评论】
【收藏本文】
【推荐好友】
【打印本文】
【论坛讨论】 |
相关文章: |
|
|
文章评论:(0条) |
|
|
|
|
责任编辑:it167 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。 |
|