Вызов функции VBScript из Javascript
Ваш VBScript:
Function myVBFunction()
' here comes your vbscript code
End Function
Ваш Javascript:
function myJavascriptFunction(){
myVBFunction(); // calls the vbs function
}
window.onload = myJavascriptFunction;
Alternatives (incompatible in some IE versions):
// This one:
window.onload = function(){ myVBFunction(); }
// This will also work:
window.onload = myVBFunction();
// Or simply:
myVBFunction();
// From a hardcoded link, don't write a semicolon a the end:
<a href="#" onclick="VBscript:myVBFunction('parameter')">link</a>
инвертирование:
Вызов функции Javascript из VBScript
Function myVBFunction()
myJavascriptFunction()
End Function