买的是校园网最低端的套餐,只能连一个端口,一直手动输入太麻烦了心血来潮想用油猴简化下操作,但是按照以前写的门户网登录行不通,想着来请哥哥们看看问题
<input class="edit_lobo_cell" type="text" name="DDDDD" maxlength="30" placeholder="账号" autocomplete="off" style="top: 138px; left: 28px; width: 284px; height: 55px; border-radius: 4px; border: 1px solid rgb(184, 184, 184); text-align: left; color: rgb(127, 127, 127); padding-left: 24px; position: absolute; background-color: rgb(255, 255, 255); background-image: url(http://10.254.100.106:801/eportal/extern/PG1AEl1662307240/y3WDWy1662307261/f28541edf8b2c29525428b9b07944ab8.png); font-size: 17px;" data-localize="pc.xuan19">
这是校园网填写账号的代码块
// ==UserScript==
// @name 一师校园网自动登录
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://10.254.100.106/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
// Your code here...
document.querySelector("div.edit_cell.edit_image.codediv.ui-resizable-autohide input[name='DDDDD']").value="123456";//账号
document.querySelector("div.edit_cell.edit_image.codediv.ui-resizable-autohide input[name='upass']").value="123456";//密码
document.querySelector("div.edit_cell.edit_image.codediv.ui-resizable-autohide select[name='ISP_select']").value="@xyw";//选择
document.querySelector("div.edit_cell.edit_image.codediv.ui-resizable-autohide input[name='OMKKey']").click();//登录
})();
这是我写的几句,目前运行是能匹配到网页,但是没有进行任何操作