Asp生成HTML方法大全 方法一:FSOSet fs = CreateObject("Scripting.FileSystemObject")NewFile=Server.MapPath("/asp/chap06/at/newfile.html")'新建一文件/newfile.html,若该文件已存在,则覆盖它Set a = fs.CreateTextFile(NewFile, True)Response.Write"新文件已建立!"a.closeFile=Server.MapPath("newfile.html")Set txt=fs.OpenTextFile(File,8,True) '打开成可以在结尾写入数据的文件data1="这句话是使用WriteLine方法写入的哦!~~"txt.WriteLine data1data2="这句话是使用Write方法写入的哦!~~"txt.Write data2txt.Close方法二:XMLHTTP<%Set xml = Server.CreateObject("Microsoft.XMLHTTP")'把下面的地址替换成你的首页的文件地址,一定要用http://开头的绝对路径,不能写相对路径xml.Open "GET", "http://www.phpup.com", Falsexml.SendBodyText=xml.ResponseBodyBodyText=BytesToBstr(BodyText,"gb2312")Set xml = NothingDim fso, MyFileSet fso = CreateObject("Scripting.FileSystemObject")Set MyFile= fso.CreateTextFile(server.MapPath("aa.htm"), True)MyFile.WriteLine(BodyText)MyFile.Close其他:1下面的例子是将、index.asp?id=1/index.asp?id=2/index.asp?id=3/这三个动态页面,分别生成ndex1.htm,index2.htm,index3.htm存在根目录下面:<%dim strUrl,Item_Classid,id,FileName,FilePath,Do_Url,Html_TempHtml_Temp="