document.addEventListener('DOMContentLoaded', function() {
// 預設的ID和密碼
var presetId = '預設ID';
var presetPassword = '預設密碼';
var userIdElement = document.getElementById('userId');
var passwordElement = document.getElementById('password');
var submitButton = document.querySelector('button[type="submit"]');
// 檢查ID和密碼輸入框是否存在
if(userIdElement && passwordElement) {
console.log('ID和密碼輸入框存在。');
// 自動填充ID和密碼
userIdElement.value = presetId;
passwordElement.value = presetPassword;
// 檢查提交按鈕是否存在
if(submitButton) {
console.log('提交按鈕存在。');
// 自動點擊確定按鈕
submitButton.click();
} else {
console.log('提交按鈕不存在。');
}
} else {
console.log('ID或密碼輸入框不存在。');
}
});
這樣只要網頁加載後就會在洞填入你預設的id跟密碼~因為我真的很懶