Which of the following method sends input to a script via a URL?

  1. Get

  2. Post

  3. Both

  4. None


Correct Option: A

AI Explanation

To answer this question, you need to understand the difference between the "Get" and "Post" methods in web programming.

Option A) Get - This option is correct because the "Get" method sends input to a script via a URL. When using the "Get" method, the input data is appended to the URL as query parameters. This method is commonly used for retrieving data from a server.

Option B) Post - This option is incorrect because the "Post" method does not send input to a script via a URL. Instead, the input data is sent in the body of the HTTP request. This method is commonly used for submitting data to a server, such as when submitting a form.

Option C) Both - This option is incorrect because the "Post" method does not send input via a URL. Therefore, the correct answer is not "Both".

Option D) None - This option is incorrect because the "Get" method does send input to a script via a URL. Therefore, the correct answer is not "None".

The correct answer is A) Get. This option is correct because the "Get" method sends input to a script via a URL by appending the input data to the URL as query parameters.

Find more quizzes: