婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > VBS、ASP代碼語法加亮顯示的類

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

熱門標簽:沈陽電話機器人公司 成都ai外呼系統線路 長春公司外呼系統中心 云南便宜外呼系統平臺 廣東語音外呼系統公司 虛擬電話外呼系統 鄭州智能外呼電銷機器人廠家 鄢陵學校如何做地圖標注 沈陽三五防封電銷卡
復制代碼 代碼如下:

%
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已經在class中。這里調用方法就可以了。



' 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
%>

標簽:馬鞍山 遼陽 湖北 平頂山 朝陽 孝感 四平 防城港

巨人網絡通訊聲明:本文標題《VBS、ASP代碼語法加亮顯示的類》,本文關鍵詞  VBS,ASP,代碼,語法,加亮,顯示,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《VBS、ASP代碼語法加亮顯示的類》相關的同類信息!
  • 本頁收集關于VBS、ASP代碼語法加亮顯示的類的相關信息資訊供網民參考!
  • 推薦文章
    婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av
    国产精品超碰97尤物18| 美女精品一区二区| 精品成人一区二区| 一区二区三区蜜桃| 91视频观看视频| 国产一区二区调教| 国产精华液一区二区三区| 精品久久久久久久久久久院品网 | 678五月天丁香亚洲综合网| 亚洲香蕉伊在人在线观| 加勒比av一区二区| 亚洲天堂精品视频| 自拍偷自拍亚洲精品播放| 日本欧美在线看| 久久久久成人黄色影片| 欧美精品vⅰdeose4hd| 91猫先生在线| 日韩黄色免费电影| 欧美在线你懂的| 日韩一区二区电影| 欧美日韩美少妇| 91视视频在线观看入口直接观看www| 欧美成人伊人久久综合网| 麻豆精品在线视频| 国产欧美日韩在线| 亚洲欧美区自拍先锋| 欧美一级视频精品观看| 日韩欧美色综合| 日韩国产欧美三级| 欧美视频精品在线观看| 精品一区二区三区视频| 亚洲婷婷综合久久一本伊一区| 欧美日本在线一区| av亚洲精华国产精华| 奇米色一区二区三区四区| 一区免费观看视频| 日韩一级视频免费观看在线| jizz一区二区| 美女免费视频一区| 亚洲国产视频a| 国产精品高潮呻吟| 亚洲精品一线二线三线| 欧美日韩国产成人在线91| 依依成人综合视频| 亚洲黄色小说网站| 国产精品毛片大码女人| 亚洲一区二区视频在线| 日本一区二区三区四区 | 日产欧产美韩系列久久99| 2021国产精品久久精品| 欧美色爱综合网| 在线免费观看视频一区| 成人高清伦理免费影院在线观看| 久久97超碰国产精品超碰| 亚洲午夜精品网| 国产精品视频麻豆| 久久久久高清精品| 欧美一区二区视频在线观看2022| 色综合一个色综合亚洲| 国产成人免费视频网站高清观看视频| 亚洲成人av电影| 亚洲乱码中文字幕| 欧美国产日产图区| 久久久精品欧美丰满| 日韩午夜激情免费电影| 69久久夜色精品国产69蝌蚪网| 欧美影院午夜播放| 日本精品裸体写真集在线观看| 成人一二三区视频| 粉嫩在线一区二区三区视频| 国产毛片精品视频| 国产成人在线视频网址| 欧美日韩电影在线播放| 欧美三级日韩三级| 欧美精品成人一区二区三区四区| 91麻豆精品国产91久久久久久| 欧美精品一卡二卡| 成人免费va视频| voyeur盗摄精品| 欧美激情在线免费观看| 狠狠色狠狠色合久久伊人| 亚洲乱码国产乱码精品精98午夜 | 亚洲男人的天堂av| 亚洲精选在线视频| 偷拍亚洲欧洲综合| 九九**精品视频免费播放| 国产成人综合亚洲91猫咪| 97精品国产露脸对白| 色综合婷婷久久| 91精品国产麻豆| 久久婷婷成人综合色| 中文字幕欧美激情| 亚洲综合小说图片| 免费成人在线影院| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲国产裸拍裸体视频在线观看乱了| 成人app网站| 国产精品传媒视频| 欧美日韩不卡一区| 在线看国产一区二区| 日韩国产欧美在线观看| 国产精品一二三| 国产在线精品一区在线观看麻豆| 欧美精品777| 91免费观看国产| 久久伊人蜜桃av一区二区| 久久爱www久久做| 欧美精品v国产精品v日韩精品 | 99v久久综合狠狠综合久久| 一本色道久久综合狠狠躁的推荐| 91麻豆精品国产自产在线观看一区| 久久蜜臀中文字幕| 夜夜爽夜夜爽精品视频| 韩国成人在线视频| 在线视频你懂得一区| 久久综合色婷婷| 欧美亚洲国产一卡| 国产精品一区二区果冻传媒| 色婷婷综合在线| 日韩欧美一级精品久久| 亚洲美女免费在线| 国产精品久久网站| 久久久www免费人成精品| 日韩精品一区二区三区蜜臀| 亚洲一区二区成人在线观看| 欧美日韩一区二区欧美激情| 欧美一区二区女人| 一区二区不卡在线播放 | 日韩欧美一区二区免费| 亚洲欧美自拍偷拍| 欧美日韩国产精选| 国产美女视频91| 粉嫩久久99精品久久久久久夜| 91亚洲午夜精品久久久久久| 国产人久久人人人人爽| 韩国成人精品a∨在线观看| 91精品蜜臀在线一区尤物| 亚洲免费在线播放| 91麻豆福利精品推荐| 国产精品拍天天在线| 久久se这里有精品| 精品久久99ma| 久久精品国产亚洲a| 欧美电影精品一区二区| 麻豆高清免费国产一区| 欧美一个色资源| 男男成人高潮片免费网站| 欧美色精品天天在线观看视频| 亚洲精品v日韩精品| av在线不卡观看免费观看| 欧美不卡激情三级在线观看| 亚洲男同性视频| 国产精品家庭影院| 欧美成人精品1314www| 色av综合在线| 国产成人av在线影院| 亚洲18女电影在线观看| 国产精品美女一区二区在线观看| 91精品国产91久久综合桃花| 色综合天天综合网天天狠天天| 韩国欧美国产1区| 日韩av一区二区三区四区| 国产精品久久久久影院亚瑟| 日韩视频中午一区| 欧美人妇做爰xxxⅹ性高电影| 成人精品一区二区三区四区| 国产真实精品久久二三区| 日韩高清一级片| 91麻豆国产福利精品| 国产精品免费aⅴ片在线观看| 久久色在线视频| 一本到不卡免费一区二区| 污片在线观看一区二区 | 欧美日韩午夜影院| 久久国产生活片100| 亚洲免费观看高清完整 | 国产欧美日韩视频在线观看| 国产精品妹子av| 久久久亚洲高清| 久久一区二区三区四区| 久久久久久久久久久99999| 精品国产一二三| 国产精品69毛片高清亚洲| 欧美r级在线观看| 色婷婷香蕉在线一区二区| 久久99久久精品欧美| 中文字幕精品三区| 日韩一级完整毛片| av午夜一区麻豆| 久久99精品国产.久久久久久| 亚洲精选视频在线| 中文字幕国产一区| 亚洲电影在线播放| 中文子幕无线码一区tr| 精品国产乱码久久久久久蜜臀| 93久久精品日日躁夜夜躁欧美| 韩国av一区二区| 午夜精品久久久久久久久久久| 国产精品久久久久桃色tv| 精品少妇一区二区三区免费观看|