【Asp实现假静态】教程文章相关的互联网学习教程文章

ASP AJAX 静态分页第1/2页

<html> <head> <title>AJAX静态分页演示://www.gxlcms.com</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <style type="text/css"> <!-- body { text-align:center;font:14px Verdana,sans-serif; } a:link,a:visited { color:#00f;text-decoration:none; } a:hover { color:#f00;text-decoration:underline; } #main { width:450px;background...

asp+ajax实现静态页面分页的代码【图】

最近因工作需要,要在静态页面上实现分页,想了下,决定用AJAX来实现,所以就捣鼓了下面这么个东西,截图如下: 代码如下:<html> <head> <title>AJAX静态分页</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <style type="text/css"> <!-- body { text-align:center;font:14px Verdana,sans-serif; } a:link,a:visited { color:#00f;text-decoration:none; } a:hover ...

在ASP中不用模板生成HTML静态页直接生成.html页面

我们一般生成HTML静态页时,常常会事先做好一个模板,然后生成时调用模板文件。那么有没有办法不用模板,如一个正常的htmer.asp页面,直接生成为htmer.html页面呢?当然是可以的,而且非常简单,今天就教大家在ASP中不用模板生成HTML静态页的方法。 这里假设有一个htmer.asp动态页面,你想把它生成为HTML静态页面htmer.html,那么我们首先新建一个ASP程序文件htmer_to_html.asp(该文件就是用来将htmer.asp动态页面生成为静态页面h...

asp正则替换链接实现伪静态效果

这是一个替换动态网址成静态网址的程序: 代码如下:<% Function RegUrl(TheStr) Set RegEx = New RegExp RegEx.IgnoreCase =True regEx.Global = True ****这一句加上是全部替换,如果不加,只替换第一个 RegEx.Pattern = "pic_list_mb\.asp\?id=(\d*)\&page=(\d*)" RegUrl=RegEx.replace(TheStr,"pic_list_$1_$2.html")End Functioncontent="<ul><li><a href=pic_list_mb.asp?id=1&page=2>动态网址</a></li><li><a href=pic_list_...

asp生成静态HTML(动态读取)

代码如下:<!--#include file="admin_Checkuser.asp"--> <% call ConnectionDatabase()dim str,str_newstr=""str_new=""sqlx="select id from Fl_Products order by id desc" set rsx=conn.execute(sqlx)do while not rsx.eofstr=str&rsx("id")&"|"rsx.movenext :looprsx.closesqlx="select id from Fl_News order by id desc" set rsx=conn.execute(sqlx)do while not rsx.eofstr_new=str_new&rsx("id")&"|"rsx.movenext :looprsx....

asp简单生成静态的方法(模板标签替换)

CreateHtml所有文章生成,好用资源大 第一种方法: 代码如下:开始HTML生成方式 Set Rs=Server.Createobject("Adodb.Recordset") Sql="Select KQIQI_ID,KQIQI_Title,KQIQI_Pinyin,KQIQI_Explain,KQIQI_Content,KQIQI_Record From KQIQI_CY Order By KQIQI_ID Desc" Rs.Open Sql,Conn,1,3 Datanum=Rs.Recordcount For i= 1 To Datanum Title=Replace(Replace(Rs(1),Chr(13),""),Chr(10),"") 开始生成成语文件 Set Fso=Createobject("...

ASP页面静态化批量生成代码分享(多种方法)

1、ASP两种简单的生成静态首页的方法 为什么要生成静态首页? 1、如果你首页读取的数据库次数比较多,速度很慢,而且占用很多服务器资源。使用静态页面访问速度当然快多了 2、搜索引擎容易搜索到 3、如果程序出问题,也能保证首页能访问。 4、其他的太多,自己想:) 应用方式: 如果你的首页是index.asp,你可以生成index.htm (默认访问顺序必须是index.htm,index.asp)。这样访问者第一次访问到你的网站的时候打开的是index.htm ...

从一个网站扒下的asp生成静态页面的代码 脚本之家特供版

代码如下:<% webfolder="/" host="index_cn.asp"'前台动态地址 folder="/"'文件夹 filename="index_cn.html"'生成静态文件名 Fso_info host,folder,filename response.write"生成网站中文首页静态HTML完成.<br />" '生成html Function Fso_info(host,folder,filename) host="http://"+Request.ServerVariables("HTTP_HOST")&webfolder&host if SaveFile(""&folder&filename&"",""&host&"") then response.Write ""&folder&filename...

ASP批量生成静态页面的写法(批量生成技巧iframe)

代码如下:<!-- #include file="../conn.asp" --> <!-- #include file="../cls_main.asp" --> <html> <head> <meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>生成百度XML</title> </head> <body> <% dim sid,eid sid=abs(request("sid")) if sid=0 then sid=0 else sid=cint(request("sid")) end if eid=cint(request("eid")) if eid=0 then ...

ASP中不用模板生成HTML静态页面的方法

当然是可以的,而且非常简单,今天就教大家在ASP中不用模板生成HTML静态页的方法。 这里假设有一个htmer.asp动态页面,你想把它生成为HTML静态页面htmer.html,那么我们首先新建一个ASP程序文件htmer_to_html.asp(该文件就是用来将htmer.asp动态页面生成为静态页面htmer.html的),htmer_to_html.asp的具体代码如下所示: 代码如下:<form method="post" action=""> <textarea name="asp2html" style="display:none"><!--#include...

asp定时生成静态HTML的代码

代码如下:<% 判断是否要生成新的HTML if Application("cache_asptohtml_date")="" then Application.Lock Application("cache_asptohtml_date")=now() Application.Unlock Call aspTohtml Response.Redirect("index.html") end if if DateDiff("s", Application("cache_asptohtml_date"),Now)> 100 then 比较上次更新时间与当前时间相差多少秒 Application.Lock Application("cache_asptohtml_date")=now() Application.UnLock Cal...

ASP UTF-8编码生成静态网页的函数

以下函数采用FSO对象,文件位置在FSO.ASP。FSO对象的文件编码属性只有三种,系统默认,Unicode,ASCII,并没有我们要的utf-8,所以一般中文系统上使用FSO对象生成的文件都是gb2312网页编码格式,无法生成UTF-8编码,因此,英文等拉丁语系和中文可以正常显示,但象俄语等非拉丁语系,页面就会出现乱码。 代码如下:function createfile(sfilename,scontent) set fso=server.CreateObject("scripting.filesystemobject") set f1=fso....

asp 网站静态化函数代码html

代码如下:Function htmll(mulu,htmlmulu,FileName,filefrom,htmla,htmlb,htmlc,htmld) if mulu="" then mulu="/" if htmlmulu="" then htmlmulu="/" mulu=replace(SysRootDir&mulu, "//", "/") htmlmulu=replace(SysRootDir&htmlmulu, "//", "/") FilePath=Server.MapPath(mulu)&"\"&FileName Do_Url="http://" Do_Url=Do_Url&Request.ServerVariables("server_name")&htmlmulu&filefrom Do_Url=Do_Url&"?"&htmla&htmlb&"&"&htmlc&...

asp 由动态网页转变为静态网页的实现代码

具体代码实现: 1.模板文件(html) 代码如下:<html xmlns="http://www.gxlsystem.com" target="_blank"><strong>哎呀呀</strong></a> <a href="http://www.gxlsystem.com" target="_blank">哎呀呀加盟</a> <a href="http://www.gxlsystem.com" target="_blank">哎呀呀饰品</a> <script src="http://s23.cnzz.com/stat.php?id=1117055&web_id=1117055" language="JavaScript" charset="gb2312"></script></span> </body> </html> ...

asp 静态页面的另一种思路

其实这里的静态页面并不是真正意义上的静态,但可以达到了静态页面的解析效率,还未经项目测试,拿来分享。 代码如下:<% Const DEVJS_INDEX="index.html" Const INDEX_DEFAULT_INTERVAL=300 Dim sLastUpdate '用Application保存最后更新的时间,而在页面里做判断,每隔300秒(5分钟)就生成一次页面 sLastUpdate=Application("INDEX_LAST_Update") If sLastUpdate="" or DateDiff("s",sLastUpdate,now())>INDEX_DEFAULT_INTERVAL The...