jsp是运行在服务器端的程序,而VBScript是运行在客户端的,jsp中好像不能调用vbscript定义的函数。

解决方案 »

  1.   

    JRun里可以使用javascript来写程序直接调用vbs当然会出错了,你想实现什么功能那?
      

  2.   

    jsp是运行在服务器端的程序,而VBScript是运行在客户端的,jsp中好不能调用script函数。如果你非要用的话,只能像以下这样运行script函数;如果你想要得到的是script函数的返回值,只能提交页面.
    <%
    out.print("<script language='JavaScript'>");
    out.print("<!--                          "); 
    out.print("fcName();//所有调用的函数名   ");
    out.print("//-->                         ");
    out.print("</script>                     ");
    %>
      

  3.   

    那么如何才能让vbscript接收上一个页面提交的参数呢?
      

  4.   

    <script langauge="VBScript">
          YourVar = <%= request("YourPara") %>
    </script>
      

  5.   

    <%
      String strPara=request.getParameter("Para");
      //如果参数为汉字别忘记用下面代码转码
      //strPara= new String (strPara.getBytes("ISO8859-1"),"GB2312");
    %>
    .
    .
    .
    .
    <script langauge="VBScript">
         var VBScriptPara= <%=strPara%>;
    </script>
      

  6.   

    though enough,but not right.the answer is far from the first question.the answer is yes,you can call a function write in vbscript in a jsp.