简体   繁体   中英

Pre-fill form on Javascript site

Hi guys please could you help me I want to pre-fill the Centre part of the form on this website

https://bt.learnmyway.com/user#!/register

So that once a user goes on it the centre is pre-populated, the centre to be populated with is Azalea Academy Community interest company or centre ID 8008530

I tried to look at view source but not sure what the name of the variable is and its not responding when I use #centre_id=8008530 at the end?

Would really appreciate the help

Thanks

Just do this: Since the website runs on jquery, this code gets the Id of the form input and puts a value to it, but of course you can clearly do this manually, but here is the code: Just open developer tools, and on the console type this:

$('#centre_id').val(8008530);

or

$('#centre_id').val('Azalea Academy Community Interest company');

Or replace with whatever value you'd like inside val()

And of course this will only last until you reload the page, because you are only changing what's in your browser, not the code being received from the server

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM