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>
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 抹茶獅子 的頭像
    抹茶獅子

    抹茶控的Wonderland

    抹茶獅子 發表在 痞客邦 留言(0) 人氣()