<% ... price="ZZZZZ"priceRed="要替换的内容"Set fso = Server.CreateObject("Scripting.FileSystemObject")News_mb="gg.html" '模板页 Set news_list_mb = fso.OpenTextFile(Server.MapPath(News_mb),1)tmpmb=news_list_mb.readallnews_list_mb.close tmpmb=replace(tmpmb, "{price}",price)tmpmb=replace(tmpmb, "{price}",priceRed) filename="gg.js" '要生成的文件Set fso = Server.CreateObject("Scripting.FileSystemObject")Set files = fso.CreateTextFile(Server.MapPath(filename),true)files.WriteLine tmpmbResponse.flushfiles.close %>