POSTメソッドを使用した自動HTMLログイン–ダブルクリックでWebサイトに自動ログイン
公開: 2014-03-08Username/Email
とPassword
を自動的に入力してウェブサイトにログインしたい場合はどうなりますか?
まあ、それに対する簡単な解決策があります。 このソリューションは、フォーム内にログインとパスワードのフィールドが含まれている多数のWebサイトで機能します。
これが簡単なログインページ(Crunchify-LoginPage.html)で、ここに電子メールとパスワードを入力する必要があります。 リンク。
above fields
に自動的に入力するには、デスクトップまたは便利な場所に1つのサンプルファイル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 > |
