'[声明部]
Dim mBtl_CodeLib_SystemScriptVerName '脚本版本前缀
Dim mBtl_CodeLib_SystemScriptInfo '系统加载脚本的信息公共变量。
Dim mBtl_CodeLib_SystemScriptLanguage '系统默认脚本语言。
Dim mBtl_CodeLib_SystemScriptInfos() '系统脚本信息数组
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 Function
Function 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 Function
Function 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