i want to login to pinterest with javascript i write some code can you help me ? <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <script> var email; window.location.href = 'https://www.pinterest.com/login/'; email= document.getElementsByClassName("loginUsername").innerHTML; alert (email); </script> <body> </body> </html> Code (JavaScript): i see html code of pinterest : <input name="email" id="userEmail" placeholder="Email" class="email" value="" autocomplete="email" autofocus="" type="email">
all html code: <div class="LoginPage Module"> <div class="contents"> <div class="Login LoginBase Module"> <form class="loginForm" method="post"> <h1> Log In to Pinterest </h1> <div class="socialLogin"> <button class="Button Module btn hasText large rounded unAuthFacebookConnect registerLoginButton" type="button"> <em></em> <span class="buttonText">Log In with Facebook</span> </button> <button data-gapiattached="true" class="Button GplusConnectButton Module btn hasText large rounded unAuthGplusConnect registerLoginButton Button" type="button"> <em></em> <span class="buttonText">Log In with Google</span> </button> <button class="Button Module btn hasText large rounded unAuthTwitterConnect registerLoginButton" type="button"> <em></em> <span class="buttonText">Log In with Twitter</span> </button> </div> <ul class="userLogin"> <li class="loginUsername"> <input autofocus="" class="email hasError" name="username_or_email" placeholder="Email" autocomplete="email" type="email"><p class="formErrorMessage">Required</p> </li> <li class="loginPassword"> <input name="password" placeholder="Password" type="password"> </li> </ul> <div class="businessHint"> Are you a business? <a href="https://www.pinterest.com/_/_/business/" target="_blank">Get started here</a> </div> <div class="loginError"></div> <div class="formFooter"> <div class="formFooterButtons"> <button disabled="" class="Button Module btn hasText large primary rounded disabled" type="submit"> <span class="buttonText">Log In</span> </button> </div> <ul class="auxillaryLinks"> <li> <a href="/password/reset/" class="forgotPassword">Forgot your password?</a> </li> <li> <a href="/">Sign up now</a> </li> </ul> </div> </form> </div> </div> </div> HTML:
How is this an answer to what the user was asking about - what you're showing is HTML-code to provide "login with <whatever service>" - not login TO the service in question (pinterest).