求ASP转HTML程程序完善
<link type=text/css href='private.css' rel=stylesheet><table border=0 cellspacing=1 align=center class=navi>
<tr align=left><th> 当前位置:栏目分页</th></tr>
</table>
<br>
<br>
<!--显示生成进度条-->
<script>
function fs(s,cs)
{
document.getElementById("contents").style.width=s+'%'
document.getElementById("titles").value=s+"%"
document.getElementById("counts").value=cs
}
</script>
生成进度:<span ><input type="text" name="titles" id="titles" value="" style="width:50px; border:0px;font-weight:bold; color:#799ae1" /> 共:<input type="text" name="counts" id="counts" value="" style="width:30px; border:0px; text-align:center; font-weight:bold; color:#799ae1" />个文件</span>
<div id="contents" style="height:20px; border:1px solid #FFFFFF; background-color:#799ae1;margin:0 auto;"></div><br>
<%
Function getHTTPPage(url)
Dim Http
Set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
If Http.readystate<>4 Then
Exit Function
End If
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
Set http = Nothing
If err.number<>0 Then err.Clear
End Function
Function BytesToBstr(body,Cset)
Dim objstream
Set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
Set objstream = nothing
End Function
Function SavePage(FileName,Content)
Dim FSO,Fout
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set Fout = FSO.CreateTextFile(Server.Mappath(""&FileName&""),True)
Fout.Write Content
Fout.Close
set Fout = nothing
set FSO = nothing
End Function
mpage=1
for i = 1 to 1
Response.Flush
Response.Clear
x=int(i*100/mpage)
response.Write("<script>fs("&x&","&mpage&")</script>")
next
'''''''''免费版暂不支持此功能'''''''''''
response.write " <table cellspacing='1' class=list align=center>"
response.write "<tr><th align=left> 详细内容!</th></tr>"
response.write "<tr><td height=500 align=left> 页面 详细内容生成成功! << 1秒后自动返回</td></tr>"
response.write "</table><script>window.setTimeout(""location.href='zh.asp'"",1000);</script>"
%>