0

How to program JS to ‘click’ a “submit” button on a webpage?

IM TRYING TO CREATE A CODE TO AUTOMATICALLY LOG ME In, BUT DONT KNOW HOW TO cLICK THE “LOGIN” BUTTON. THANKS!!! HeRES THE WEBSITE’S CODE: form action="/home/signin?ReturnUrl=%2fclients%2fdetails%" method="post"> <fieldset> <div class="login-inner"> <input id="ReturnUrl" name="ReturnUrl" type="hidden" value="/clients/details/" /> <div class="input-container"> <span class="input-label"> <label for="Email">Email</label> </span> <input class="input" id="Email" name="Email" placeholder="Email or User Name" size="16" type="text" value="" /> </div> <div class="input-container"> <span class="input-label"> <label for="Password">Password</label> </span> <input class="input" id="Password" name="Password" placeholder="Password" size="16" type="password" /> </div> <div> <input type="submit" class="login" value="Log In" /> </div> </div> </fieldset> </form>

5th Nov 2019, 2:10 PM
Randy
Randy - avatar
4 Answers
+ 2
<input type="submit" onclick="onClick();" <script> function onClick(){ //some code } </script>
5th Nov 2019, 3:32 PM
Alexander Lebedev
Alexander Lebedev - avatar
+ 1
I don't think you can submit data without having to click the "Login" button.
5th Nov 2019, 7:13 PM
Joyce Bissa
Joyce Bissa - avatar
0
hmm, this appears to be a code for creating a login button. i was hoping to write a JS code to automatically submit my entered data without me having to click the already-present login button.
5th Nov 2019, 6:45 PM
Randy
Randy - avatar
0
on bummer :/ thanks guys!!
6th Nov 2019, 1:39 PM
Randy
Randy - avatar