如何自动点击网页按钮
http://club.
请问如何点击这个网页上的“领取”按钮(三个如何区分)?谢谢。
ttp://www.
红包 - - Excel Home论坛 -GS_googleEnableAllServices();
GA_googleFetchAds();
function getElementsByName_iefix(tag, name) {
var elem = document.getElementsByTagName(tag);
var arr = new Array();
for(i = 0,iarr = 0; i < elem.length; i++) {
att = elem[i].getAttribute("name");
if(att == name) {
arr[iarr] = elem[i];
iarr++;
}
}
return arr;
}
function chgrank() {
var rankschg = getElementsByName_iefix('div', 'ranks');
for(var j = 0;j < rankschg.length;j++) {
if(rankschg[j].style.display == 'block') {
rankschg[j].style.display = 'none';
if(j == rankschg.length - 1) {
rankschg[0].style.display = 'block';
} else {
rankschg[j+1].style.display = 'block'
}
break;
}
}
setTimeout("chgrank()", 5000);
}
window.onload = chgrank();
红包 ›
红包领取排行榜
红包列表
名称:每日早茶
说明:喝杯早茶,一天好心情!128份,先到先得!
版主2倍哦!
发放时间:2012-5-4 09:30:00 ~ 2012-5-4 10:00:00
积分项:财富: 2 ~ 5
已领取/总数:[本红包已被领取光了]
领取名称:每日夜宵
说明:吃顿夜宵,补充能量,准备做个美梦!
发放时间:2012-5-4 21:00:00 ~ 2012-5-4 21:30:00
积分项:财富: 2 ~ 5
已领取/总数:0 / 128
领取名称:午后好运来
说明:领包要谨慎,祝君好运来!
发放时间:2012-5-4 14:00:00 ~ 2012-5-4 16:00:00
积分项:财富: -5 ~ 10
已领取/总数:[本红包已被领取光了]
领取function checkval(pid, link, moderate) {
ajaxresponse(pid, link, moderate);
}
function ajaxresponse(pid, data, mod) {
var x = new Ajax('XML', mod+pid);
x.get(data, function(s){
var obj = $(mod+pid);
s = trim(s);
if(s.indexOf('bad_mod') < 0) {
if(s.indexOf('通过审核') > -1) {
obj.style.display = '';
obj.innerHTML = ' ' + s;
obj.className = "warning";
$('no_pass' + pid).innerHTML = '';
$('trbg' + pid).style.background="#fff";
}
if(s.indexOf('已删除') > -1) {
obj.style.display = '';
obj.innerHTML = ' ' + s;
obj.className = "warning";
}
} else {
warning(obj, '操作失败');
}
});
}
function warning(obj, msg) {
obj.style.display = '';
obj.innerHTML = ' ' + msg;
obj.className = "warning";
}
function killErrors() {return true;}
window.onerror = killErrors;
var invisiblestatus = '在线';
var loginstatusobj = $('loginstatusid');
if(loginstatusobj != undefined && loginstatusobj != null) loginstatusobj.innerHTML = invisiblestatus;
回顶部