jQuery ajax()URL是必需的吗? [英] jQuery ajax() URL is required?

查看:87
本文介绍了jQuery ajax()URL是必需的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ajax function 的标题是: jQuery.ajax(url [,settings])

根据文档说明需要URL,示例中的原因是只提供'设置'?

With the documentation saying that URL is required, why in the examples is only 'settings' supplied?

$.ajax({
  type: "GET",
  url: "test.js",
  dataType: "script"
});


推荐答案

就在下面,你会看到 $。ajax 其他语法 c $ c>,只传递一个设置对象,包括URL。

Right below that, you'll see the other syntax for $.ajax, where just a settings object is passed, including the URL.

这篇关于jQuery ajax()URL是必需的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆