使用方法:手工修改html文件的名称与想要生成的asp的文件名称,然后将下面的代码保存为1.vbs,跟1.html放同一个目录双击运行即可。
html = "1.html"
asp = "1.asp"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fhtml = fso.OpenTextFile(html, 1)
Set fasp = fso.OpenTextFile(asp, 2, true)
While fhtml.AtEndOfStream <> true
text = fhtml.ReadLine
text = "Response.Write "&""""&Replace(text, """", """""")&""""
fasp.WriteLine(text)
wend
fhtml.close
fasp.close
set fso = nothing
msgbox "success"