jQuery getScript() 方法

jQuery 教程 · 2019-03-28 13:57:10

实例

使用 AJAX 请求,获取和运行 JavaScript:

$("button").click(function(){ $.getScript("demo_ajax_script.js"); });

定义和用法

getScript() 方法使用 AJAX 的 HTTP GET 请求获取和执行 JavaScript。

语法

$(selector).getScript(url,success(response,status))

参数 描述
url 必需。规定将请求发送到哪个 URL。
success(response,status) 可选。规定当请求成功时运行的函数。
额外的参数:
  • response - 包含来自请求的结果数据
  • status - 包含请求的状态("success"、"notmodified"、"error"、"timeout"、"parsererror")

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

Introduction to Semi-Supervised Learning

Introduction to Semi-Supervised Learning

Xiaojin Zhu、Andrew B. Goldberg / Morgan and Claypool Publishers / 2009-6-29 / USD 40.00

Semi-supervised learning is a learning paradigm concerned with the study of how computers and natural systems such as humans learn in the presence of both labeled and unlabeled data. Traditionally, le......一起来看看 《Introduction to Semi-Supervised Learning》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具