close
參考資料: http://www.htmlforums.com/forum/website-development/client-side-scripting/16702-calling-vbscript-function-from-javascript
Depends on what you mean by 'vbscript function'.
If you want to call a function or subroutine you've written in vbscript, then just invoke it from javascript:
myVBfunction();
If you want to use one of the native VB functions, like say len, or msgbox, then wrap it in your own function:
Code:
<script language="vbscript"> Function myTrim(str) myTrim = Trim(str) End Function </script> <script language="javascript"> var excessString = " Leading & Trailing Spaces " var trimString = myTrim(excessString) </script>
全站熱搜