亚洲综合原千岁中文字幕_国产精品99久久久久久久vr_无码人妻aⅴ一区二区三区浪潮_成人h动漫精品一区二区三

主頁 > 知識(shí)庫(kù) > VBS、ASP代碼語法加亮顯示的類

VBS、ASP代碼語法加亮顯示的類

熱門標(biāo)簽:沈陽電話機(jī)器人公司 成都ai外呼系統(tǒng)線路 長(zhǎng)春公司外呼系統(tǒng)中心 云南便宜外呼系統(tǒng)平臺(tái) 廣東語音外呼系統(tǒng)公司 虛擬電話外呼系統(tǒng) 鄭州智能外呼電銷機(jī)器人廠家 鄢陵學(xué)校如何做地圖標(biāo)注 沈陽三五防封電銷卡
復(fù)制代碼 代碼如下:

%
Class cBuffer
Private objFSO, objFile, objDict
Private m_strPathToFile, m_TableBGColor, m_StartTime
Private m_EndTime, m_LineCount, m_intKeyMin, m_intKeyMax
Private m_CodeColor, m_CommentColor, m_StringColor, m_TabSpaces

Private Sub Class_Initialize()
TableBGColor = "white"
CodeColor = "Blue"
CommentColor = "Green"
StringColor = "Gray"
TabSpaces = " "
PathToFile = ""

m_StartTime = 0
m_EndTime = 0
m_LineCount = 0

KeyMin = 2
KeyMax = 8

Set objDict = server.CreateObject("Scripting.Dictionary")
objDict.CompareMode = 1

CreateKeywords

Set objFSO = server.CreateObject("Scripting.FileSystemObject")
End Sub

Private Sub Class_Terminate()
Set objDict = Nothing
Set objFSO = Nothing
End Sub


Public Property Let CodeColor(inColor)
m_CodeColor = "font color="  inColor  ">Strong>"
End Property
Private Property Get CodeColor()
CodeColor = m_CodeColor
End Property

Public Property Let CommentColor(inColor)
m_CommentColor = "font color="  inColor  ">"
End Property
Private Property Get CommentColor()
CommentColor = m_CommentColor
End Property

Public Property Let StringColor(inColor)
m_StringColor = "font color="  inColor  ">"
End Property
Private Property Get StringColor()
StringColor = m_StringColor
End Property

Public Property Let TabSpaces(inSpaces)
m_TabSpaces = inSpaces
End Property
Private Property Get TabSpaces()
TabSpaces = m_TabSpaces
End Property

Public Property Let TableBGColor(inColor)
m_TableBGColor = inColor
End Property

Private Property Get TableBGColor()
TableBGColor = m_TableBGColor
End Property

Public Property Get ProcessingTime()
ProcessingTime = Second(m_EndTime - m_StartTime)
End Property

Public Property Get LineCount()
LineCount = m_LineCount
End Property

Public Property Get PathToFile()
PathToFile = m_strPathToFile
End Property
Public Property Let PathToFile(inPath)
m_strPathToFile = inPath
End Property

Private Property Let KeyMin(inMin)
m_intKeyMin = inMin
End Property
Private Property Get KeyMin()
KeyMin = m_intKeyMin
End Property
Private Property Let KeyMax(inMax)
m_intKeyMax = inMax
End Property
Private Property Get KeyMax()
KeyMax = m_intKeyMax
End Property

Private Sub CreateKeywords()
objDict.Add "abs", "Abs"
objDict.Add "and", "And"
objDict.Add "array", "Array"
objDict.Add "call", "Call"
objDict.Add "cbool", "CBool"
objDict.Add "cbyte", "CByte"
objDict.Add "ccur", "CCur"
objDict.Add "cdate", "CDate"
objDict.Add "cdbl", "CDbl"
objDict.Add "cint", "CInt"
objDict.Add "class", "Class"
objDict.Add "clng", "CLng"
objDict.Add "const", "Const"
objDict.Add "csng", "CSng"
objDict.Add "cstr", "CStr"
objDict.Add "date", "Date"
objDict.Add "dim", "Dim"
objDict.Add "do", "Do"
objDict.Add "loop", "Loop"
objDict.Add "empty", "Empty"
objDict.Add "eqv", "Eqv"
objDict.Add "erase", "Erase"
objDict.Add "exit", "Exit"
objDict.Add "false", "False"
objDict.Add "fix", "Fix"
objDict.Add "for", "For"
objDict.Add "next", "Next"
objDict.Add "each", "Each"
objDict.Add "function", "Function"
objDict.Add "global", "Global"
objDict.Add "if", "If"
objDict.Add "then", "Then"
objDict.Add "else", "Else"
objDict.Add "elseif", "ElseIf"
objDict.Add "imp", "Imp"
objDict.Add "int", "Int"
objDict.Add "is", "Is"
objDict.Add "lbound", "LBound"
objDict.Add "len", "Len"
objDict.Add "mod", "Mod"
objDict.Add "new", "New"
objDict.Add "not", "Not"
objDict.Add "nothing", "Nothing"
objDict.Add "null", "Null"
objDict.Add "on", "On"
objDict.Add "error", "Error"
objDict.Add "resume", "Resume"
objDict.Add "option", "Option"
objDict.Add "explicit", "Explicit"
objDict.Add "or", "Or"
objDict.Add "private", "Private"
objDict.Add "property", "Property"
objDict.Add "get", "Get"
objDict.Add "let", "Let"
objDict.Add "set", "Set"
objDict.Add "public", "Public"
objDict.Add "redim", "Redim"
objDict.Add "select", "Select"
objDict.Add "case", "Case"
objDict.Add "end", "End"
objDict.Add "sgn", "Sgn"
objDict.Add "string", "String"
objDict.Add "sub", "Sub"
objDict.Add "true", "True"
objDict.Add "ubound", "UBound"
objDict.Add "while", "While"
objDict.Add "wend", "Wend"
objDict.Add "with", "With"
objDict.Add "xor", "Xor"
End Sub

Private Function Min(x, y)
Dim tempMin
If x  y Then tempMin = x Else tempMin = y
Min = tempMin
End Function

Private Function Max(x, y)
Dim tempMax
If x > y Then tempMax = x Else tempMax = y
Max = tempMax
End Function

Public Sub AddKeyword(inKeyword, inToken)
KeyMin = Min(Len(inKeyword), KeyMin)
KeyMax = Max(Len(inKeyword), KeyMax)

objDict.Add LCase(inKeyword), inToken
End Sub

Public Sub ParseFile(blnOutputHTML)
Dim m_strReadLine, tempString, blnInScriptBlock, blnGoodExtension, i
Dim blnEmptyLine

m_LineCount = 0

If Len(PathToFile) = 0 Then
Err.Raise 5, "cBuffer: PathToFile Length Zero"
Exit Sub
End If

Select Case LCase(Right(PathToFile, 3))
Case "asp", "inc"
blnGoodExtension = True
Case Else
blnGoodExtension = False
End Select

If Not blnGoodExtension Then
Err.Raise 5, "cBuffer: File extension not asp or inc"
Exit Sub
End If

Set objFile = objFSO.OpenTextFile(server.MapPath(PathToFile))

Response.Write "table nowrap bgcolor="  TableBGColor  " cellpadding=0 cellspacing=0>"
Response.Write "tr>td>PRE>"

m_StartTime = Time()

Do While Not objFile.AtEndOfStream
m_strReadLine = objFile.ReadLine

blnEmptyLine = False
If Len(m_strReadLine) = 0 Then
blnEmptyLine = True
End If

m_strReadLine = Replace(m_strReadLine, vbTab, TabSpaces)
m_LineCount = m_LineCount + 1
tempString = LTrim(m_strReadLine)

' Check for the top script line that set's the default script language
' for the page.
If left( tempString, 3 ) = Chr(60)  "%@" And right(tempString, 2) = "%"  Chr(62) Then
Response.Write "table>tr bgcolor=yellow>td>"
Response.Write server.HTMLEncode(m_strReadLine)
Response.Write "/td>/tr>/table>"
blnInScriptBlock = False
' Check for an opening script tag
ElseIf Left( tempString, 2) = Chr(60)  "%" Then
' Check for a closing script tag on the same line
If right( RTrim(tempString), 2 ) = "%"  Chr(62) Then
Response.Write "table>tr>td bgcolor=yellow>%/td>"
Response.Write "td>"
Response.Write CharacterParse(mid(m_strReadLine, 3, Len(m_strReadLine) - 4))
Response.Write "/td>"
Response.Write "td bgcolor=yellow>%gt;/td>/tr>/table>"
blnInScriptBlock = False
Else
Response.Write "table>tr bgcolor=yellow>td>%/td>/tr>/table>"
' We've got an opening script tag so set the flag to true so
' that we know to start parsing the lines for keywords/comments
blnInScriptBlock = True
End If
Else
If blnInScriptBlock Then
If blnEmptyLine Then
Response.Write vbCrLf
Else
If right(tempString, 2) = "%"  Chr(62) Then
Response.Write "table>tr bgcolor=yellow>td>%>/td>/tr>/table>"
blnInScriptBlock = False
Else
Response.Write CharacterParse(m_strReadLine)  vbCrLf
End If
End If
Else
If blnOutputHTML Then
If blnEmptyLine Then
Response.Write vbCrLf
Else
Response.Write server.HTMLEncode(m_strReadLine)  vbCrLf
End If
End If
End If
End If
Loop

' Grab the time at the completion of processing
m_EndTime = Time()

' Close the outside table
Response.Write "/PRE>/td>/tr>/table>"

' Close the file and destroy the file object
objFile.close
Set objFile = Nothing
End Sub

' This function parses a line character by character
Private Function CharacterParse(inLine)
Dim charBuffer, tempChar, i, outputString
Dim insideString, workString, holdChar

insideString = False
outputString = ""

For i = 1 to Len(inLine)
tempChar = mid(inLine, i, 1)
Select Case tempChar
Case " "
If Not insideString Then
charBuffer = charBuffer  " "
If charBuffer >" " Then
If left(charBuffer, 1) = " " Then outputString = outputString  " "

' Check for a 'rem' style comment marker
If LCase(Trim(charBuffer)) = "rem" Then
outputString = outputString  CommentColor
outputString = outputString  "REM"
workString = mid( inLine, i, Len(inLine))
workString = replace(workString, "", "<")
workString = replace(workString, ">", ">")
outputString = outputString  workString  "/font>"
charBuffer = ""
Exit For
End If

outputString = outputString  FindReplace(Trim(charBuffer))
If right(charBuffer, 1) = " " Then outputString = outputString  " "
charBuffer = ""
End If
Else
outputString = outputString  " "
End If
Case "("
If left(charBuffer, 1) = " " Then
outputString = outputString  " "
End If
outputString = outputString  FindReplace(Trim(charBuffer))  "("
charBuffer = ""
Case Chr(60)
outputString = outputString  ""
Case Chr(62)
outputString = outputString  ">"
Case Chr(34)
' catch quote chars and flip a boolean variable to denote that
' whether or not we're "inside" a quoted string
insideString = Not insideString
If insideString Then
outputString = outputString  StringColor
outputString = outputString  """
Else
outputString = outputString  """"
outputString = outputString  "/font>"
End If
Case "'"
' Catch comments and output the rest of the line
' as a comment IF we're not inside a string.
If Not insideString Then
outputString = outputString  CommentColor
workString = mid( inLine, i, Len(inLine))
workString = replace(workString, "", "<")
workString = replace(workString, ">", ">")
outputString = outputString  workString
outputString = outputString  "/font>"
Exit For
Else
outputString = outputString  "'"
End If
Case Else
' We've dealt with special case characters so now
' we'll begin adding characters to our outputString
' or charBuffer depending on the state of the insideString
' boolean variable
If insideString Then
outputString = outputString  tempChar
Else
charBuffer = charBuffer  tempChar
End If
End Select
Next

' Deal with the last part of the string in the character buffer
If Left(charBuffer, 1) = " " Then
outputString = outputString  " "
End If
' Check for closing parentheses at the end of a string
If right(charBuffer, 1) = ")" Then
charBuffer = Left(charBuffer, Len(charBuffer) - 1)
CharacterParse = outputString  FindReplace(Trim(charBuffer))  ")"
Exit Function
End If

CharacterParse = outputString  FindReplace(Trim(charBuffer))
End Function

' return true or false if a passed in number is between KeyMin and KeyMax
Private Function InRange(inLen)
If inLen >= KeyMin And inLen = KeyMax Then
InRange = True
Exit Function
End If
InRange = False
End Function

' Evaluate the passed in string and see if it's a keyword in the
' dictionary. If it is we will add html formatting to the string
' and return it to the caller. Otherwise just return the same
' string as was passed in.
Private Function FindReplace(inToken)
' Check the length to make sure it's within the range of KeyMin and KeyMax
If InRange(Len(inToken)) Then
If objDict.Exists(inToken) Then
FindReplace = CodeColor  objDict.Item(inToken)  "/Strong>/Font>"
Exit Function
End If
End If
' Keyword is either too short or too long or doesn't exist in the
' dictionary so we'll just return what was passed in to the function 
FindReplace = inToken
End Function

End Class
%>





!--#include file="token.asp"-->
% ' *************************************************************************
' This is all test/example code showing the calling syntax of the 
' cBuffer class ... the interface to the cBuffer object is quite simple.
'
' Use it for reference ... delete it ... whatever.
' *************************************************************************

REM This is a rem type comment just for testing purposes!

' This variable will hold an instance of the cBuffer class
Dim objBuffer

' Set up the error handling
On Error Resume Next

' create the instance of the cBuffer class
Set objBuffer = New cBuffer

' Set the PathToFile property of the cBuffer class
'
' Just for kicks we'll use the asp file that we created
' in the last installment of this article series for testing purposes
objBuffer.PathToFile = "../081899/random.asp" '這是文件名啦。

' Here's an example of how to add a new keyword to the keyword array
' You could add a list of your own function names, variables or whatever...cool!
' NOTE: You can add different HTML formatting if you like, the strong>
' attribute will applied to all keywords ... this is likely to change
' in the near future.
'
'objBuffer.AddKeyword "response.write", "font color=Red>Response.Write/font>"

' Here are examples of changing the table background color, code color, 
' comment color, string color and tab space properties
'
'objBuffer.TableBGColor = "LightGrey" ' or
'objBuffer.TableBGColor = "#ffffdd" ' simple right?
'objBuffer.CodeColor = "Red"
'objBuffer.CommentColor = "Orange"
'objBuffer.StringColor = "Purple"
'objBuffer.TabSpaces = " "

' Call the ParseFile method of the cBuffer class, pass it true if you want the
' HTML contained in the page output or false if you don't
objBuffer.ParseFile False '注意:顯示代碼的response.write已經(jīng)在class中。這里調(diào)用方法就可以了。



' Check for errors that may have been raised and write them out
If Err.number > 0 Then
Response.Write Err.number  ":"  Err.description  ":"  Err.source  "br>"
End If

' Output the processing time and number of lines processed by the script
Response.Write "strong>Processing Time:/strong> "  objBuffer.ProcessingTime  " secondsbr>"
Response.Write "strong>Lines Processed:/strong> "  objBuffer.LineCount  "br>" 

' Destroy the instance of our cBuffer class
Set objBuffer = Nothing
%>

標(biāo)簽:馬鞍山 遼陽 湖北 平頂山 朝陽 孝感 四平 防城港

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《VBS、ASP代碼語法加亮顯示的類》,本文關(guān)鍵詞  VBS,ASP,代碼,語法,加亮,顯示,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《VBS、ASP代碼語法加亮顯示的類》相關(guān)的同類信息!
  • 本頁收集關(guān)于VBS、ASP代碼語法加亮顯示的類的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 久久精品店| 毛片电影网| 国产成人精品综合在线| 999精品在线| 国产视频一区二区在线播放| 99色视频| 美女免费黄网站| 国产麻豆精品免费视频| 欧美爱爱网| 美女免费黄网站| 国产91精品露脸国语对白| 国产精品自拍一区| 日韩一级黄色| 国产伦精品一区二区三区无广告| 国产成人精品综合久久久| 欧美a级片免费看| 欧美激情一区二区三区在线| 国产视频久久久| 九九九国产| 精品视频在线看 | 国产麻豆精品免费密入口| 日韩免费在线| 成人免费一级纶理片| 久久成人性色生活片| 四虎影视库| 亚洲精品久久久中文字| 精品国产三级a∨在线观看| 久久国产一久久高清| 欧美激情在线精品video| 日本免费乱人伦在线观看| 人人干人人插| 国产视频一区在线| 精品视频在线观看免费| 成人免费网站久久久| 精品国产亚洲一区二区三区| 色综合久久手机在线| 精品毛片视频| | 久久国产精品自线拍免费| 国产视频一区二区在线观看| 可以免费看毛片的网站| 国产原创中文字幕| 日本在线不卡免费视频一区| 久久精品大片| 国产成人精品综合久久久| 久久久久久久久综合影视网| 久久99这里只有精品国产| 亚洲 激情| 免费一级片在线观看| 日韩av成人| 午夜欧美成人香蕉剧场| 亚洲精品影院一区二区| 国产网站免费视频| 国产91素人搭讪系列天堂| 精品国产亚洲人成在线| 国产福利免费观看| 国产视频一区二区在线观看| 欧美激情中文字幕一区二区| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 一级毛片看真人在线视频| 久久精品免视看国产明星| 999精品视频在线| 中文字幕97| 日本特黄特色aaa大片免费| 精品视频在线看 | 国产a毛片| 日本伦理片网站| 一本高清在线| 亚洲www美色| 久久久久久久久综合影视网| 四虎久久精品国产| 九九九国产| 国产麻豆精品免费视频| 免费国产在线视频| 美女免费毛片| 沈樵在线观看福利| 国产成人精品综合久久久| 久久精品免视看国产明星| 国产网站免费| 国产网站免费观看| 99色视频在线观看| 精品国产三级a∨在线观看| 成人a大片在线观看| 91麻豆tv| 久久国产影视免费精品| 美女免费毛片| 成人高清免费| 国产视频久久久| 欧美18性精品| 国产视频一区在线| 国产a视频| 高清一级片| 日韩欧美一二三区| 高清一级毛片一本到免费观看| 一级女性大黄生活片免费| 夜夜操网| 黄视频网站免费观看| 欧美一级视频高清片| 一级女性全黄生活片免费| 99久久精品国产高清一区二区| 韩国三级一区| 一级毛片看真人在线视频| 一级毛片看真人在线视频| 精品视频在线看| 精品国产香蕉在线播出| 天堂网中文在线| 可以在线看黄的网站| 免费一级片在线| 免费的黄色小视频| 99色视频在线观看| 欧美激情中文字幕一区二区| 黄视频网站在线观看| 日本特黄特黄aaaaa大片| 国产福利免费观看| 国产一区二区精品久| 99久久精品国产国产毛片| 日韩综合| 午夜在线亚洲| 午夜欧美成人久久久久久| 亚洲精品中文一区不卡| 色综合久久天天综合| 国产伦久视频免费观看 视频| 久久福利影视| 久久精品免视看国产明星| 免费毛片基地| 日韩av东京社区男人的天堂| 精品久久久久久综合网| a级黄色毛片免费播放视频| 青青青草视频在线观看| 成人av在线播放| 精品视频一区二区三区| 久久成人综合网| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 麻豆午夜视频| 欧美一级视频高清片| 欧美激情伊人| 四虎论坛| 高清一级毛片一本到免费观看| 国产视频一区在线| 国产一区二区精品尤物| 精品视频在线观看一区二区| 免费国产在线视频| 高清一级做a爱过程不卡视频| 久久国产精品自由自在| 亚洲第一色在线| 天堂网中文字幕| 精品国产亚洲人成在线| 欧美国产日韩在线| 国产麻豆精品| 国产韩国精品一区二区三区| 日日夜夜婷婷| 青青久久网| 日本特黄特黄aaaaa大片| 亚洲天堂免费| 国产伦精品一区二区三区无广告| 四虎影视久久| 九九久久国产精品大片| 日韩av成人| 中文字幕一区二区三区精彩视频| 精品国产亚洲一区二区三区| 国产一区二区精品久| 欧美激情在线精品video| 日韩在线观看网站| 久久精品免视看国产成人2021| 欧美激情一区二区三区在线| 深夜做爰性大片中文| 一级女人毛片人一女人| 在线观看成人网 | 香蕉视频亚洲一级| 国产亚洲精品aaa大片| 欧美一级视频免费| 精品国产一区二区三区久久久蜜臀 | 欧美大片一区| 亚欧成人乱码一区二区| 九九免费高清在线观看视频 | 日韩女人做爰大片| 香蕉视频一级| 成人a级高清视频在线观看| 亚洲精品中文字幕久久久久久| 日本特黄特黄aaaaa大片| 国产一级强片在线观看| 亚洲精品影院一区二区| 四虎论坛| 亚欧乱色一区二区三区| 免费一级片在线| 国产成人精品综合在线| 午夜欧美成人久久久久久| 91麻豆精品国产片在线观看| 999久久久免费精品国产牛牛| 日韩一级黄色片| 日本免费乱理伦片在线观看2018| 亚久久伊人精品青青草原2020| 国产伦久视频免费观看视频| 国产网站免费| 香蕉视频久久| 999久久狠狠免费精品| 在线观看成人网 | 午夜在线亚洲| 国产伦精品一区二区三区在线观看|