How to locate the js code and php code of WordPress website for certain function?

For example, I want to debug the code for uploading an image when composing a post in WordPress backend. I click the “Add Media” button, right-click on the “Media Library” tab, click the “Inspect” item on the context menu(Firefox). Then I click the “event” button at the end of a <div id=”__wp-uploader-id-2…> element, and find several drop event handlers,one of which is tagged with jQuery, the others are tagged with “Bubbling DOM2”. I click the event handlers and get these code:

How to upload multiple files using PHP, jQuery and AJAX

I have designed a simple form which allows the user to upload files to the server. Initially the form contains one ‘browse’ button. If the user wants to upload multiple files, he needs to click on the “Add More Files” button which adds another ‘browse’ button in the form. When the form is submitted, the file upload process is handled in ‘upload.php’ file. It works perfectly fine for uploading multiple files. Now I need to submit the form by using jQuery’s ‘.submit()’ and send a ajax [‘.ajax()’] request to the ‘upload.php’ file to handle the file upload.