把下面的代码复制存为html.asp
然后运行即可查询效果
<%if request("body")="" then%><form action="html.asp?act=ok" method=post name="myform"><textarea name="body" cols="100" rows="10">这里是要生成的内容
www.upasp.cn
www.dxpai.com
www.2yue.com.cn
www.0097.org
www.qqlou.com
www.qq25.com
www.fanyiwang.com.cn
www.yzjyzx.com
www.touqing.net</textarea>
<br>
<input type="submit" name="Submit" value=" 开始生成 ">
</form>,将这个textarea包含在表单中,在接收表单页用创建FSO对象,如下生成index.html文件!
<%end if%>
<%dim act
act=request.querystring("act")
select case act
case "ok"
filename="index.html"
if request("body")<>"" then
set fso = Server.CreateObject("Scripting.FileSystemObject")
set laos = fso.CreateTextFile(server.mappath(""&filename&""))
laos.write request.form("body")
laos.close
set laos=nothing
set fso=nothing
end if
response.Write"<a href=index.html target=_blank>成功了</a>"
end select
%>