既然vbs占多数,为什么不全用vbs写
js能做的vbs基本上都能做到

解决方案 »

  1.   

    好,举个例
    ;)asp sample
    try{
             conn.Execute(querystring,adCmdTable);
    }catch(e)
    {
             Response.Write("can't find out anything according to querying");
             Response.End();
    }finally{
             //normal display
    }
    vbs如果querystring有错,那么vbs总会报错。
    我就喜欢js里的try,catch能够捕捉错误多好啊
      

  2.   

    晕倒, 干吗要用VBS来写类, 在客户端来说JS绝对比VBS好用, 通用.<script language=javascript>
    function chiny()
    {
      this.hello = function()
      {
        alert("hello");
      }
    }var person = new chiny();person.hello();
    </script>
      

  3.   

    不是这个意思,因为有个家伙写了一个庞大的VBS包,我调用,
    我自己写的就是js
      

  4.   

    用vb编译成dll~然后activex调用~
      

  5.   

    set person = new chiny
      

  6.   

    vbs的错误捕捉:
    on error resume next
    ...
    if err.number>0 then
        response.write(err.description)
    end if
    on error goto 0
      

  7.   

    <script language=vbs>
    class chiny
    Private Sub Class_Initialize()
        
    End Sub
         public sub hello()
              msgbox "hello"
         end sub
    end class
    function GetObj()
    set GetObj= new chiny
    end function</script>
    <script language=JScript>
    var person=GetObj();
    person.hello();</SCRIPT>