请问此复选框如何单击
本帖最后由 jhun 于 2009-6-18 23:23 编辑<div style="float:left">
<div style="margin-top:5px;">销售时间查询 <input id="SearchSellTime" type="checkbox" style="width:15px; height:15px; cursor:hand;" value="0" onClick="if(SearchSellTime.checked){SearchSellTimeStr.style.display='block';SearchSellTime.value='1';}else{SearchSellTimeStr.style.display='none';SearchSellTime.value='0';}"> </div>
</div>
<div id="SearchSellTimeStr" style="display:none;">
起始时间 <input id="Sell_TimeStarValue" style="width:70px;" type="text" value="2009-6-18"/>
<img src="images/icon_day.gif" alt="选择日期" onClick="javascript:calendar(Sell_TimeStarValue);" style="cursor:hand" align="absmiddle" width="25" height="21">
至 <input id="Sell_TimeEndValue" style="width:70px;" type="text" value="2009-6-18"/>
<img src="images/icon_day.gif" alt="选择日期" onClick="javascript:calendar(Sell_TimeEndValue);" style="cursor:hand" align="absmiddle" width="25" height="21">
</div>
</div> $obj.checked=1
或者是$obj.check="true"
不太记得了,$obj 就是那个复选框的对象 #include <IE.au3>
$oIE = _IECreate ("C:\Documents and Settings\Administrator\桌面\此复选框如何单击.html")
$o = _IEGetObjById ($oIE, "SearchSellTime")
_IEAction ($o, "click") #include
$oIE = _IECreate ("C:\Documents and Settings\Administrator\桌面\此复选框如何单击.html")
$o = _IEGetObjById ($oIE, "SearchSellTime")
_IEAction ($o, "click")
lynfr8 发表于 2009-6-18 22:19 http://www.autoitx.com/images/common/back.gif
太感谢您了,我果然还是太菜了 不必客气,你昨晚那个时钟源码好像有人有兴趣哦,我也觉得挺有创意的
你不妨在源码区和大家分享下咧
独乐乐不如众乐乐嘛 本帖最后由 jhun 于 2009-6-18 22:59 编辑
不必客气,你昨晚那个时钟源码好像有人有兴趣哦,我也觉得挺有创意的
你不妨在源码区和大家分享下咧
独乐乐不如众乐乐嘛
lynfr8 发表于 2009-6-18 22:30 http://www.autoitx.com/images/common/back.gif
呵呵,好的,我只是觉得太烂,发出来怕见笑了
另外再麻烦您一下,就是单击完了出来的两个日期控件如何赋值啊,我现在是模仿你的方法
$o = _IEGetObjById ($oIE, "SearchSellTime")
_IEAction ($o, "click")
$o = _IEGetObjById ($oIE, "Sell_TimeStarValue")
_IEAction ($o,"focus")
ControlSend("","","","^a")
_IEAction ($o,"paste")
$o = _IEGetObjById ($oIE, "Sell_TimeEndValue")
_IEAction ($o,"focus")
ControlSend("","","","^a")
_IEAction ($o,"paste")
可是如果不是再当前窗口的话ControlSend("","","","^a")无效,烦请您帮帮忙
哈哈,我傻了,为空值当然是发送到当前了,不过我觉得这个方法太笨了,能用IE_INET UDF搞定吗 $o = _IEGetObjById ($oIE, "SearchSellTime")
_IEAction ($o, "click")
$o = _IEGetObjById ($oIE, "Sell_TimeStarValue")
_IEAction ($o, "focus")
_IEAction ($o, "selectall")
_IEAction ($o,"paste")
$o = _IEGetObjById ($oIE, "Sell_TimeEndValue")
_IEAction ($o,"focus")
_IEAction ($o, "selectall")
_IEAction ($o,"paste")
我居然没发现"selectall",其现在是这样解决的
页:
[1]