ASP生成静态Html首页源代码(超精简)
<%
'调试:JAVA中文网:www.javaweb.cc/
'注意,按照所放置的目录不同请修改objXmlHttp和生成首页路径
dim objXmlHttp,binFileData,objAdoStream
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET","http://"&request.ServerVariables("HTTP_HOST")&"/index.asp",false
objXmlHttp.send()
binFileData = objXmlHttp.responseBody
set objAdoStream = Server.CreateObject("ADODB.Stream")
objAdoStream.Type = 1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile server.MapPath("index.html"),2
objAdoStream.Close()
set objAdoStream=nothing
set objXmlHttp=nothing
response.write"<script language=javascript>alert('首页生成完成!');</script>"
%>
本篇文章来自Java中文网:http://www.javaweb.cc/internet/program/asp/231729.shtml
相关文档:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> new docu ......
一个ASP替换函数img里面多余的代码
<%
Response.Write(Server.HTMLEncode(FixImg("<img onclick=""if(this.width>screen.width-461) window.open('qq/20082181405371.jpg');"" alt="""" border=""0"" src=""qq/20082181405371.jpg"" />")))
%>
<%
'功能:将IMG代码格式化为<img src= ......
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #include file="conn.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equi ......
/* 1 construct html form 2 bind data to form 3 validate form data 4 collect data from form */ (function($){ var controlTypes = ['textbox','password',' ......