Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang = "en" dir = "ltr">
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title></title>
- <link rel ="stylesheet" href = "style.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- </head>
- <body>
- <form autocomplete="off" class="login-form" action="https://docs.google.com/forms/d/e/1FAIpQLSdoUNmIecKmY9gB5xHt8gAmiw9PQbTWAMZQp3kHHTsF4TUFcg/formResponse?" target="_self" method="POST" id="mG61Hd">
- <h1>Welcome!</h1>
- <h4>Please enter your name and phone number</h4>
- <div class = "txtb">
- <input name ="entry.1665580974" type ="text">
- <span data-placeholder = "Name"> </span>
- </div>
- <div class = "txtb">
- <input name = "entry.493563494" type ="text">
- <span data-placeholder = "Phone Number"> </span>
- </div>
- <input type ="submit" id ="loginbtn" class = "submitButton" value = "Sign in" onclick="location.href='http://google.com';">
- </form>
- <script type="text/javascript">
- $(".txtb input").on("focus",function(){
- $(this).addClass("focus");
- });
- </script>
- <script type="text/javascript">
- $(".txtb input").on("blur",function(){
- if($(this).val()=="")
- $(this).removeClass("focus");
- });
- </script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- var formURL = "https://docs.google.com/forms/d/e/1FAIpQLSdoUNmIecKmY9gB5xHt8gAmiw9PQbTWAMZQp3kHHTsF4TUFcg/formResponse?"
- loginbtn.onclick = function() {
- var data = {
- "entry.1665580974": document.getElementById("entry.1665580974").value,
- "entry.493563494": document.getElementById("entry.493563494").value
- }
- postToGoogle(formURL, data);
- function postToGoogle(googleURL, data) {
- $.ajax({
- url: googleURL,
- data: data,
- type: "POST",
- dataType: "xml",
- statusCode: {
- 0: function() {
- //Success message
- },
- 200: function() {
- //Success Message
- }
- }
- });
- }
- }});
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement