如何将asp转换成html?网站首页滚动图片如何固定成一个?
1asp转换最好的办法?2进入网站后台少了服务器组件栏目,上传时main和check显示成功再刷新没有了,是不是这两个文件出的问题?不懂,有指点者Q404896838来加...
1asp转换最好的办法?
2进入网站后台少了服务器组件栏目,上传时main和check显示成功再刷新 没有了,是不是这两个文件出的问题?不懂,有指点者Q404896838来加分数
3滚动图片代码是这个:<%
action=request("ok")
if action="" then
Set rs = conn.Execute("select * from adv")
%>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<form action=adv4.asp method=post name=adv>
。。。
response.write "<script language='javascript'>"
response.write "alert('滚动图片设置成功!');"
response.write "location.href='adv4.asp';"
response.write "</script>"
response.end 展开
2进入网站后台少了服务器组件栏目,上传时main和check显示成功再刷新 没有了,是不是这两个文件出的问题?不懂,有指点者Q404896838来加分数
3滚动图片代码是这个:<%
action=request("ok")
if action="" then
Set rs = conn.Execute("select * from adv")
%>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<form action=adv4.asp method=post name=adv>
。。。
response.write "<script language='javascript'>"
response.write "alert('滚动图片设置成功!');"
response.write "location.href='adv4.asp';"
response.write "</script>"
response.end 展开
2个回答
展开全部
将asp页面转换成html页面
Sub GenFile(id)
dim objXmlHttp
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET","http://www.xxx.com/product.asp?id=" & id ,false
objXmlHttp.send()
Dim binFileData
binFileData = objXmlHttp.responseBody
Dim objAdoStream
set objAdoStream = Server.CreateObject("ADODB.Stream")
objAdoStream.Type = 1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile Server.MapPath("/product") & "\" & id & ".htm",2
objAdoStream.Close()
dim sI,sA
sI=""
sA=""
dim objFSO,objFile
set objFSO = server.CreateObject("Scripting.FileSystemObject")
set objFile = objFSO.OpenTextFile(Server.MapPath("/product") & "\" & id & ".htm")
while not objFile.AtEndOfStream
sI = objFile.readline()
sA = sA & sI
wend
objFile.close
set objFile = nothing
''处理过程
dim sR
sR = replace(sA,"images/","../images/")
sR = replace(sR,"admin/../","../admin/")
sR = replace(sR,"class.asp","../class.asp")
sR = replace(sR,"cat.asp","../cat.asp")
sR = replace(sR,"research.asp","../research.asp")
sR = replace(sR,"help","../help")
sR = replace(sR,"mess.asp","../mess.asp")
sR = replace(sR,"index.asp","../index.asp")
sR = replace(sR,"addto.asp","../addto.asp")
''重新写入
dim objFileW
set objFileW = objFSO.CreateTextFile(Server.MapPath("/product") & "\" & id & ".htm",true)
objFileW.WriteLine sR
objFileW.close
set objFileW = nothing
set objFSO = nothing
end sub
Sub GenFile(id)
dim objXmlHttp
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET","http://www.xxx.com/product.asp?id=" & id ,false
objXmlHttp.send()
Dim binFileData
binFileData = objXmlHttp.responseBody
Dim objAdoStream
set objAdoStream = Server.CreateObject("ADODB.Stream")
objAdoStream.Type = 1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile Server.MapPath("/product") & "\" & id & ".htm",2
objAdoStream.Close()
dim sI,sA
sI=""
sA=""
dim objFSO,objFile
set objFSO = server.CreateObject("Scripting.FileSystemObject")
set objFile = objFSO.OpenTextFile(Server.MapPath("/product") & "\" & id & ".htm")
while not objFile.AtEndOfStream
sI = objFile.readline()
sA = sA & sI
wend
objFile.close
set objFile = nothing
''处理过程
dim sR
sR = replace(sA,"images/","../images/")
sR = replace(sR,"admin/../","../admin/")
sR = replace(sR,"class.asp","../class.asp")
sR = replace(sR,"cat.asp","../cat.asp")
sR = replace(sR,"research.asp","../research.asp")
sR = replace(sR,"help","../help")
sR = replace(sR,"mess.asp","../mess.asp")
sR = replace(sR,"index.asp","../index.asp")
sR = replace(sR,"addto.asp","../addto.asp")
''重新写入
dim objFileW
set objFileW = objFSO.CreateTextFile(Server.MapPath("/product") & "\" & id & ".htm",true)
objFileW.WriteLine sR
objFileW.close
set objFileW = nothing
set objFSO = nothing
end sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询