如果我叫jQuery.post()和一个空的URL会发生什么? [英] What happens if I call jQuery.post() with an empty url?

查看:128
本文介绍了如果我叫jQuery.post()和一个空的URL会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我提交表单与空的动作领域,它提交当前页面 - 这是用Ajax请求的情况下

If I submit a form with an empty action field, it submits to the current page--is this the case with ajax requests?

推荐答案

这是正确的,它提交当前页面。

That's correct, it submits to the current page.

参考,jQuery的文档:

Reference, jQuery documentation:

网址(串)
    默认值:本网页
    要将请求发送一个包含URL字符串。

url (String)
Default: The current page
A string containing the URL to which the request is sent.

来源

这篇关于如果我叫jQuery.post()和一个空的URL会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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