Tutorials References Exercises Sign Up Menu
Create Website Get Certified Pro

jQuery getScript() Method

❮ jQuery AJAX Methods


Get and run a JavaScript using an AJAX request:

Try it Yourself »

Definition and Usage

The getScript() method is used to get and execute a JavaScript using an AJAX HTTP GET request.



Parameter Description
url Required. Specifies the url to send the request to
success(response,status) Optional. Specifies the function to run if the request succeeds
Additional parameters:
  • response - contains the result data from the request
  • status - contains the status of the request ("success", "notmodified", "error", "timeout", or "parsererror")

❮ jQuery AJAX Methods