tArrayEnd=UBound(mBtl_CodeLib_SystemScriptInfos) ReDim Preserve mBtl_CodeLib_SystemScriptInfos(tArrayEnd) mBtl_CodeLib_SystemScriptInfos(tArrayEnd)=pScriptFileName mBtl_CodeLib_SystemScriptInfo=tOutStr End Function'[脚本导入函数] Function mBtl_CodeLib_ScriptLoad(pURL,pWindow) '功能:导入指定脚本到指定窗口对象。 '参数:pURL 指定Script文件的地址。 ' pWindow 导入该要素的目的窗口对象。 Set tOutObj=mBtl_CodeLib_ScriptObjCreateByURL(pURL,pWindow) pWindow.document.body.insertBefore tOutObj End FunctionFunction mBtl_CodeLib_ScriptObjCreateByURL(pURL,pWindow) '功能:在指定窗口对象创建一个VBScript的script要素。该要素指定src属性为pURL。 '参数:pURL 指定Script文件的地址。 ' pWindow 创建该要素的目的窗口对象。 Set tOutObj=pWindow.document.createElement("script") With tOutObj .language=mBtl_CodeLib_SystemScriptLanguage .type="text/" & mBtl_CodeLib_SystemScriptLanguage .src=pURL End With Set mBtl_CodeLib_ScriptObjCreateByURL=tOutObj End Function'[样式导入函数] Function mBtl_CodeLib_StyleLoad(pURL,pWindow) '功能:导入指定样式到指定窗口对象。 '参数:pURL 指定css文件的地址。 ' pWindow 导入该要素的目的窗口对象。 Set tOutObj=mBtl_CodeLib_StyleObjCreateByURL(pURL,pWindow) pWindow.document.body.insertBefore tOutObj End FunctionFunction mBtl_CodeLib_StyleObjCreateByURL(pURL,pWindow) '功能:在指定窗口对象创建一个Style的Link要素。该要素指定href属性为pURL。 '参数:pURL 指定css文件的地址。 ' pWindow 创建该要素的目的窗口对象。 Set tOutObj=pWindow.document.createElement("link") With tOutObj .rel="StyleSheet" .type="text/css" .href=pURL End With Set mBtl_CodeLib_StyleObjCreateByURL=tOutObj End Function
'模块:Mahayana Boot Lib CodeLib
'说明:加载'[声明部]
Dim mBtl_CodeLib_SystemScriptVerName '脚本版本前缀
Dim mBtl_CodeLib_SystemScriptInfo '系统加载脚本的信息公共变量。
Dim mBtl_CodeLib_SystemScriptLanguage '系统默认脚本语言。
Dim mBtl_CodeLib_SystemScriptInfos() '系统脚本信息数组ReDim mBtl_CodeLib_SystemScriptInfos(0)'[初始化]
mBtl_CodeLib_SystemScriptLanguage="VBScript"
mBtl_CodeLib_SystemScriptVerName="Aries"'[注册部]
mBtl_CodeLib_SystemScriptInfo_AddItem "Mahayana Boot Lib CodeLib","AriesScript_mBtl_CodeLib.vba"'[加载部]
mBtl_CodeLib_ScriptLoad "AriesScript_mBot_System.vba",window'[脚本信息服务函数]
Function mBtl_CodeLib_SystemScriptInfo_AddItem(pScriptName,pScriptFileName)
'功能:添加脚本信息到mBtl_CodeLib_SystemScriptInfo变量。
'参数:pScriptName 脚本名
' pScriptFileName 脚本文件名 tOutStr=mBtl_CodeLib_SystemScriptInfo
tOutStr=tOutStr & Chr(13) & Chr(10) & mBtl_CodeLib_SystemScriptVerName & " " & pScriptName & " " & "[" & pScriptFileName & "]"
tArrayEnd=UBound(mBtl_CodeLib_SystemScriptInfos)
ReDim Preserve mBtl_CodeLib_SystemScriptInfos(tArrayEnd)
mBtl_CodeLib_SystemScriptInfos(tArrayEnd)=pScriptFileName mBtl_CodeLib_SystemScriptInfo=tOutStr
End Function'[脚本导入函数]
Function mBtl_CodeLib_ScriptLoad(pURL,pWindow)
'功能:导入指定脚本到指定窗口对象。
'参数:pURL 指定Script文件的地址。
' pWindow 导入该要素的目的窗口对象。
Set tOutObj=mBtl_CodeLib_ScriptObjCreateByURL(pURL,pWindow)
pWindow.document.body.insertBefore tOutObj
End FunctionFunction mBtl_CodeLib_ScriptObjCreateByURL(pURL,pWindow)
'功能:在指定窗口对象创建一个VBScript的script要素。该要素指定src属性为pURL。
'参数:pURL 指定Script文件的地址。
' pWindow 创建该要素的目的窗口对象。
Set tOutObj=pWindow.document.createElement("script")
With tOutObj
.language=mBtl_CodeLib_SystemScriptLanguage
.type="text/" & mBtl_CodeLib_SystemScriptLanguage
.src=pURL
End With
Set mBtl_CodeLib_ScriptObjCreateByURL=tOutObj
End Function'[样式导入函数]
Function mBtl_CodeLib_StyleLoad(pURL,pWindow)
'功能:导入指定样式到指定窗口对象。
'参数:pURL 指定css文件的地址。
' pWindow 导入该要素的目的窗口对象。
Set tOutObj=mBtl_CodeLib_StyleObjCreateByURL(pURL,pWindow)
pWindow.document.body.insertBefore tOutObj
End FunctionFunction mBtl_CodeLib_StyleObjCreateByURL(pURL,pWindow)
'功能:在指定窗口对象创建一个Style的Link要素。该要素指定href属性为pURL。
'参数:pURL 指定css文件的地址。
' pWindow 创建该要素的目的窗口对象。
Set tOutObj=pWindow.document.createElement("link")
With tOutObj
.rel="StyleSheet"
.type="text/css"
.href=pURL
End With
Set mBtl_CodeLib_StyleObjCreateByURL=tOutObj
End Function