使用 POST 方法自動登錄 HTML – 雙擊自動登錄網站
已發表: 2014-03-08如果您想通過自動填寫Username/Email
和Password
來登錄網站怎麼辦?
好吧,有一個簡單的解決方案。 此解決方案適用於在表單中包含登錄名和密碼字段的大量網站。
這是一個簡單的登錄頁面 (Crunchify-LoginPage.html),我必須在其中提供電子郵件和密碼。 關聯。
為了讓您自動填寫above fields
,只需在您的桌面或方便的位置創建一個示例文件Crunchify.html
文件並將其放在下面的內容。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
< html > < head > < title > Crunchify Login Page < / title > <script> function loginForm ( ) { document . myform . submit ( ) ; document . myform . action = "https://crunchify.com/wp-content/uploads/code/Crunchify-LoginPage.html" ; } </script> <style type ="text/css"> body { background-image : url ( 'https://cdn.crunchify.com/bg.png' ) ; } </style> < / head > < body onload = "loginForm()" > < form action = "https://crunchify.com/wp-content/uploads/code/success.html" name = "myform" method = "post" > < input type = "password" name = "password" value = "mypassw@rd" > < input type = "submit" value = "Login" > < / form > < / body > < / html > |
就是這樣。 只需double click
上面的文件,就可以了。
以下是內部將發生的情況:
- 當您打開
Crunchify.html
文件時,它將在內部打開您的專用頁面Crunchify-LoginPage.html
- 在內部,它將傳遞您在 Crunchify.html 文件中提供的電子郵件和密碼
- 提交後,您將進入
success.html
頁面
這是非常基本的 HTML 技巧,但有時它可以為重複登錄活動節省大量時間。
僅供參考:這是 Crunchify-LoginPage.html 頁面源代碼,這是我在此示例中經常使用的登錄頁面:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
< ! DOCTYPE html > < html lang = "en" > < head > < meta charset = "utf-8" > < meta http - equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" > < title > Crunchify - Login Form Example < / title > <style type ="text/css"> body { background-image : url ( 'https://cdn.crunchify.com/bg.png' ) ; } </style> < / head > < body > < div align = "center" > < section class = "container" > < div class = "login" > < h1 > Crunchify Web App - Automatic HTML Login Demo Page < / h1 > < form name = "myform" action = "https://crunchify.com/wp-content/uploads/code/success.html" > < p > < input type = "text" name = "email" value = "" placeholder = "Email" > < / p > < p > < input type = "password" name = "password" value = "" placeholder = "Password" > < / p > < p class = "submit" > < input type = "submit" name = "submit" value = "Login" > < / p > < / form > < / div > < / section > < section class = "about" > < p class = "about-author" > © 2012 – 2016 < a href = "https://crunchify.com" target = "_blank" > Crunchify . com < / a > < / section > < / div > < / body > < / html > |
