不懂?既然有了js,为什么还要vbs?
在windows里能用js的地方比可以用vbs也!
何谓徒劳?!

解决方案 »

  1.   

    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <script language="vbscript">
    Dim dogs,fish,birds
    dogs = Array("poodle","puli","greyhound")
    fish = Array("trout", "mackerel", "bass")
    birds = Array("robin", "hummingbird", "crow")function swapOptions(the_array_name)
      dim numbers_select,the_array
      set numbers_select = window.document.the_form.the_examples
      set the_array = Eval(the_array_name)
      setOptionText window.document.the_form.the_examples, the_array
    end functionfunction setOptionText(the_select, the_array)
      dim loop
      for loop = 0 to the_select.options.length
        the_select.options(loop).text = the_array(loop)
      next
      
    end function
    </script>
            <form name="the_form">
              <p><font face="宋体"><select name="choose_category" onChange="swapOptions(window.document.the_form.choose_category.options[selectedIndex].text);" size="1">
                <option selected>dogs </option>
                <option>fish </option>
                <option>birds </option>
              </select> <select name="the_examples" multiple size="1">
                <option>poodle </option>
                <option>puli </option>
                <option>greyhound . </option>
              </select> </font></p>
            </form></head><P>&nbsp;</P></BODY>
    </HTML>还没有测试,明天吧
      

  2.   

    <HTML>
    <HEAD>
    <TITLE>VBScript</TITLE>
    <script language="VBScript">
    dim dogs, fish, birdsdogs = Array("poodle","puli","greyhound")
    fish = Array("trout", "mackerel", "bass")
    birds = Array("robin", "hummingbird", "crow")function swapOptions(the_array_name)
      dim the_array
      the_array = eval(the_array_name)
      call setOptionText(window.document.the_form.the_examples, the_array)
    end functionfunction setOptionText(the_select, the_array)
      dim nLoop
      for nLoop = 0 to the_select.options.length - 1
    the_select.options(nLoop).text = the_array(nLoop)
      next
    end function
    </script>
    </HEAD>
    <BODY>
            <form name="the_form">
              <p><font face="宋体"><select name="choose_category" onChange="call swapOptions(me.options(me.selectedIndex).text)" size="1" language="vbscript">
                <option selected>dogs </option>
                <option>fish </option>
                <option>birds </option>
              </select> <select name="the_examples" multiple size="1">
                <option>poodle </option>
                <option>puli </option>
                <option>greyhound . </option>
              </select> </font></p>
            </form></head><P>&nbsp;</P></BODY>
    </HTML>
      

  3.   

    <HTML>
    <HEAD>
    <TITLE>VBScript</TITLE>
    <script language="VBScript">
    dim dogs, fish, birdsdogs = Array("poodle","puli","greyhound")
    fish = Array("trout", "mackerel", "bass")
    birds = Array("robin", "hummingbird", "crow")function swapOptions(the_array_name)
      dim the_array
      the_array = eval(the_array_name)
      setOptionText window.document.the_form.the_examples, the_array
    end functionsub setOptionText(the_select, the_array)
      dim nLoop
      for nLoop = 0 to the_select.options.length - 1
    the_select.options(nLoop).text = the_array(nLoop)
      next
    end sub
    </script>
    </HEAD>
    <BODY>
            <form name="the_form">
              <p><font face="宋体"><select name="choose_category" onChange="swapOptions(me.options(me.selectedIndex).text)" size="1" >
                <option selected>dogs </option>
                <option>fish </option>
                <option>birds </option>
              </select> <select name="the_examples" multiple size="1">
                <option>poodle </option>
                <option>puli </option>
                <option>greyhound . </option>
              </select> </font></p>
            </form></head><P>&nbsp;</P></BODY>
    </HTML>画蛇添足了,呵呵
      

  4.   

    ???
    vbs什么时候有ARRAY了???VBS很烂啦。。还是不用好了。。