select 问题 vbscript

hebeiman hebeiman 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
如何通过vb 脚本动态更改select 中的内容
javascritpt

这样可以做到 vbscritp 如何做到呢


<HTML>
<HEAD>
<META name=VI60_DTCScriptingPlatform content="Server (ASP)">
<META name=VI60_defaultClientScript content=JavaScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>

<script language="VBScript">
sub test()
he.remove 1
'msgbox ww.options [ww.selectedIndex].text
'' ww.options[ww.length]= Option(14,14)
end sub
sub add()
end sub
sub showtext()
end sub
sub showvalue()
end sub
sub del()
' msgbox he.options[he.selectedIndex].value
end sub
sub addtext()
mytext.value=mytext.value+"添加"
end sub
sub deltext()
mytext.value=""
end sub
</script>

<script language='javascript'>
i=0
function add()
{
i+=1;
he.options[he.length]=new Option('hh',i)
}

function del()
{
for (j=he.length-1;j>=0;j--)
if (he.options[j].selected)
he.options[j]=null;
}

function showtext()
{
var a
a=he.options[he.selectedIndex].text
alert(a)
}
function showvalue()
{
var b
alert('showvalu');
b=he.options[he.selectedIndex].value;
alert(b);
}
function ado()
{
var b
a=new adodb.connction()

}


</script>

</HEAD>
<BODY >
<P><SELECT style="WIDTH: 85px" name=he id=he>
<OPTION value=12 selected>asdf</OPTION>
<OPTION value=13>asdf</OPTION>
<OPTION value=14>asdf</OPTION>
<OPTION value=""></OPTION>
</SELECT>

<INPUT type=button value="添加选项" onclick="javascript:add()">
<INPUT type=button value="删除选项" onclick="javascript:del()">
<INPUT type=button value="得到当前text" onclick="javascript:showtext()">
<INPUT type=button value="得到当前value" onclick="javascript:showvalue()"></P>
<P> <TEXTAREA id=mytext></TEXTAREA>
<INPUT type=button value=添加文本 onclick="vbscript:addtext()">
<INPUT type=button value=清空文本框 onclick="vbscript:deltext()">
<INPUT type=button value=Button onclick="javascript:ado()"> </P>


</BODY>
</HTML>
还有 为什么我写得java脚本只执行一次
...全文
评论 4
收藏 已收藏
分享
返回顶部
hebeiman
ASP 28,401 成员 356,940 内容