简体   繁体   中英

Reverse engineering form submit

I'm using a hosted cart system to manage a ecommerce platform. The system uses form submission to add items to the user's cart. I want to write a javascript library to allow me to add things to the cart with JS, but I will need to see what the platform is submitting so I can copy it appropriately.

Any advice how to best sniff out what the default form info is getting submitted to the form so I can copy it via jquery?

Thanks!

Open your browser's console; Chrome has it built-in, Firefox has Firebug.

The entire request will be viewable in the network tab.

Another, more-complicated option is to set up a trivial local proxy and dump the request.

You can use TamperData . It's a nice addon for Firefox that let's you view and edit this data.

Firebug and it's derivatives also has the functionality if you have that.

Firebug on firefox using the console and turn on 'persist' it will tell you whats going on after the page posts and stuff. :)

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