导出按钮点击
页面上有一个导出按钮无法点击,试用过如下代码:$Ele = _IEGetObjById($oIE,"ZeroClipboardMovie_1")
_IEAction($Ele, "click")
$Ele = _IEGetObjById($oIE,"btn_export2")
_IEAction($Ele, "click")
均不能成功,各位帮忙看看,谢谢
html代码:
<input id="btn_export2" type="button" value="导 出"/>
js代码:
ZeroClipboard.setMoviePath("../js/ZeroClipboard.swf");
var clip1 = new ZeroClipboard.Client();
clip1.setHandCursor(true);
clip1.addEventListener('mouseOver', function (client) {
clip1.setText(getTableValue("listbox"));
});
clip1.addEventListener('complete', function (client, text) {
if (userlist.isEmpty()) return showErrMsg("没有任何数据");
alert("成功复制到粘贴板,请打开WORD或EXCEL粘贴");
});
clip1.glue('btn_export1');
var clip2 = new ZeroClipboard.Client();
clip2.setHandCursor(true);
clip2.addEventListener('mouseOver', function (client) {
clip2.setText(getTableValue("listbox"));
});
clip2.addEventListener('complete', function (client, text) {
if (userlist.isEmpty()) return showErrMsg("没有任何数据");
alert("成功复制到粘贴板,请打开WORD或EXCEL粘贴");
});
clip2.glue('btn_export2');
} 试试
$Ele = _IEGetObjById($oIE,"btn_export2")
_IEAction($Ele, "focus")
_IEAction($Ele, "click") 回复 2# komaau3
_IEAction($Ele, "focus")这句执行成功了,但还是无法点击
_IEAction($Ele, "focus")
_IEAction($Ele, "click")
MsgBox(0,0,@error)
@error=0 回复 2# komaau3
还是不行? IEQuery.au3 回复 5# heavenm
能给个例子吗? 回复 5# heavenm
js("$('#btn_export1').click()")
Func js($script)
$oIE.document.parentWindow.execscript($script)
EndFunc
是这个吗?好像不行
页:
[1]