账户 document.querySelector("#header > div.banner > div > div > form > div.login_input_panel > div:nth-child(1) > div > span > input").value 密码 document.querySelector("#header > div.banner > div > div > form > div.login_input_panel > div:nth-child(2) > div > span > input").value
点击登录
document.querySelector("#header > div.banner > div > div > form > div.login_btn_panel > a").click()
大佬大佬
你用的是啥浏览器?chrome不是有记住密码功能吗?
var search = search.split('?')[1];
if(info[search]) {
var nameEle = document.getElementsByClassName('weui-desktop-form__input')[0];
var pasdEle = document.getElementsByName('password')[0];
nameEle.value = '';
setTimeout(function() {
pasdEle.focus();
pasdEle.value = '******';
//document.getElementsByClassName('btn_login')[0].click();
}, 500)
setTimeout(function() {
nameEle.addEventListener('keydown', function(e) {
console.log(e.keyCode)
})
//模拟键盘输入
for(var i = 0; i < info[search].length; i++) {
cCode = info[search].charCodeAt(i);
simulateKeyPress(nameEle, 'keydown', cCode, '0');
console.log('cCode', cCode)
}
nameEle.focus();
nameEle.value = info[search];
if("createEvent" in document) {
var evt = document.createEvent("HTMLEvents");
evt.initEvent("change", false, true);
nameEle.dispatchEvent(evt);
} else {
nameEle.fireEvent("onchange");
}
nameEle.fireEvent("onchange")
console.log(info[search])
}, 200)
}
document.querySelector("#header > div.banner > div > div > form > div.login_input_panel > div:nth-child(1) > div > span > input").value
密码
document.querySelector("#header > div.banner > div > div > form > div.login_input_panel > div:nth-child(2) > div > span > input").value
点击登录
document.querySelector("#header > div.banner > div > div > form > div.login_btn_panel > a").click()