1.首先将焦点给Select
2.然后模拟按键Alt+↓。模拟按键是使用ActiveX控件来完成的。
代码如下:
<Objecttype="application/x-oleobject"id=Shell
classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></Object>
<SELECTid=cboSort>
<OPTIONvalue=Noneselected>None</OPTION>
<OPTIONvalue=col1>序号</OPTION>
<OPTIONvalue=col2>抄表册</OPTION>
<OPTIONvalue=col3>抄表册名称</OPTION>
<OPTIONvalue=col4>抄表册性质</OPTION>
<OPTIONvalue=col5>抄表周期</OPTION>
<OPTIONvalue=col6>管理部门</OPTION>
<OPTIONvalue=col7>变压器组号</OPTION>
<OPTIONvalue=col8>变压器性质</OPTION>
<OPTIONvalue=col9>抄表员代码</OPTION>
<OPTIONvalue=col10>抄表员姓名</OPTION>
<OPTIONvalue=col11>抄表列日</OPTION>
<OPTIONvalue=col12>浮动天数</OPTION>
<OPTIONvalue=col13>初始化标志</OPTION>
<OPTIONvalue=col14>缴费天数</OPTION>
<OPTIONvalue=col15>抄表方式</OPTION>
</SELECT>
<buttonοnclick="demo();">展开</button>
Js版
<scriptlanguage="JavaScript">
functiondemo(){
cboSort.focus();
varWshShell=newActiveXObject("Wscript.Shell");
try{
WshShell.SendKeys("%{DOWN}");
}
catch(e){}
WshShell.Quit;
}
</script>
js的<Object>版
<scriptlanguage="JavaScript">
functiondemo2(){
cboSort.focus();
Shell.SendKeys("%{DOWN}");
Shell.Quit;
}
</script>
VB版:
<scriptlanguage="VBScript">
subdemo1()
cboSort.focus()
setWshShell=CreateObject("WScript.Shell")
WshShell.SendKeys"%{DOWN}"
endsub
</script>
2.然后模拟按键Alt+↓。模拟按键是使用ActiveX控件来完成的。
代码如下:
<Objecttype="application/x-oleobject"id=Shell
classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></Object>
<SELECTid=cboSort>
<OPTIONvalue=Noneselected>None</OPTION>
<OPTIONvalue=col1>序号</OPTION>
<OPTIONvalue=col2>抄表册</OPTION>
<OPTIONvalue=col3>抄表册名称</OPTION>
<OPTIONvalue=col4>抄表册性质</OPTION>
<OPTIONvalue=col5>抄表周期</OPTION>
<OPTIONvalue=col6>管理部门</OPTION>
<OPTIONvalue=col7>变压器组号</OPTION>
<OPTIONvalue=col8>变压器性质</OPTION>
<OPTIONvalue=col9>抄表员代码</OPTION>
<OPTIONvalue=col10>抄表员姓名</OPTION>
<OPTIONvalue=col11>抄表列日</OPTION>
<OPTIONvalue=col12>浮动天数</OPTION>
<OPTIONvalue=col13>初始化标志</OPTION>
<OPTIONvalue=col14>缴费天数</OPTION>
<OPTIONvalue=col15>抄表方式</OPTION>
</SELECT>
<buttonοnclick="demo();">展开</button>
Js版
<scriptlanguage="JavaScript">
functiondemo(){
cboSort.focus();
varWshShell=newActiveXObject("Wscript.Shell");
try{
WshShell.SendKeys("%{DOWN}");
}
catch(e){}
WshShell.Quit;
}
</script>
js的<Object>版
<scriptlanguage="JavaScript">
functiondemo2(){
cboSort.focus();
Shell.SendKeys("%{DOWN}");
Shell.Quit;
}
</script>
VB版:
<scriptlanguage="VBScript">
subdemo1()
cboSort.focus()
setWshShell=CreateObject("WScript.Shell")
WshShell.SendKeys"%{DOWN}"
endsub
</script>