乙個用ASP生成html的新方法

2021-04-13 06:48:02 字數 892 閱讀 9792

乙個用asp生成html的新方法

目前已經有很多生成html的新聞系統,但是都是用的模板,本函式實現把asp頁面產生的html**儲存成為乙個html檔案,這樣就沒有必要改動原來的頁面就可以輕鬆完成乙個生成html的新聞系統了。^_^ 由於**比較短,這裡就不進行注釋了

aspstart=instr(aspend,content,"<%")+2

loop

set re1 = nothing

set re=nothing

execode = execode&vbcrlf&" hughchiu_rtcode = hughchiu_rtcode&"""&replace( replace(mid(content,aspend), """", """"""), vbcrlf, """&vbcrlf&""" )&""""&vbcrlf

get_exe_code = "<%"&execode&"%/>"

end function

function asp2html(filename)

dim code

code = replace( replace( replace( get_exe_code(filename), "hughchiu_rtcode = hughchiu_rtcode&"""""&vbcrlf, "" ), "<%", "" ), "%/>", "" )

'response.write(code)

execute(code)

'response.write( hughchiu_rtcode )

asp2html = hughchiu_rtcode

end function

%>

希望這個函式對大家有點用,由於水平有限,有錯的地方請大家指出,並希望能加以改進。

乙個生成html的新方法

aspstart instr aspend,content,2 loop set re1 nothing set re nothing execode execode vbcrlf hughchiu rtcode hughchiu rtcode replace replace mid content...

乙個生成html的新方法

aspstart instr aspend,content,2 loop set re1 nothing set re nothing execode execode vbcrlf hughchiu rtcode hughchiu rtcode replace replace mid content...

ASP生成html的新方法

已經有很多生成html的新聞系統,但是都是用的模板,本函式實現把asp頁面產生的html 儲存成為乙個html檔案,這樣就沒有必要改動原來的頁面就可以輕鬆完成乙個生成html的新聞系統了。由於 比較短,這裡就不進行注釋了。以下為引用的內容 當目標頁面的包含檔案即 include的頁面裡邊存在resp...