烦请高手将此功能用vbscript实现! 不懂?既然有了js,为什么还要vbs?在windows里能用js的地方比可以用vbs也!何谓徒劳?! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><TITLE></TITLE></HEAD><BODY><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 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_arrayend 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> </P></BODY></HTML>还没有测试,明天吧 <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) nextend 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> </P></BODY></HTML> <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_arrayend 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) nextend 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> </P></BODY></HTML>画蛇添足了,呵呵 ???vbs什么时候有ARRAY了???VBS很烂啦。。还是不用好了。。 js数组 如何修改客户端注册表将桌面设为web桌面? JS怎么刷新指定页面 如何选中并拖动 iframe里的图片对象 <select></select>标签的问题 向高手请教!在IIS服务器或tomcat上javascript弹出窗口为什么不能全屏显示,而是始终保持着边框! 如何实现真正的循环滚动? 求救!!!!完成者200分!!!!不够再加!!!!我做了一个编辑页面,大家可以参考一下。 请问document和date对象的区别,谢谢 如何取回ActiveX事件的返回值 html文件中数据保存问题 怎样用JS跟网页里的FLASH文件里的变量通讯?
<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> </P></BODY>
</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> </P></BODY>
</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> </P></BODY>
</HTML>画蛇添足了,呵呵
vbs什么时候有ARRAY了???VBS很烂啦。。还是不用好了。。