POST 방식을 사용한 자동 HTML 로그인 – 더블 클릭 시 웹사이트 자동 로그인
게시 됨: 2014-03-08Username/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 > |
