JS下的网络请求学习记录

2019-05-31  本文已影响0人  旷野独狼

常见post数据格式

四种常见post的数据格式

FormData对象的使用

FormData对象的使用官方文档

FileReader对象的使用

FileReader官方文档

Form表单对象的使用

Form官方文档
表单提交:事件和方法提交
Form表单&FileReader:文件的上传和读取

input type = ‘file’

HTMLElement官方文档
input type = 'file'相关属性官方文档介绍

submit方法的使用

submit官方文档

使用web应用中的文件

Using files from web applications

Using XMLHttp​Request

AJax入门官方文档
用XMLHttpRequest 发送表单信息、上传文件
Ajax请求($.ajax()为例)中data属性传参数的形式

Array数组相关的使用

array官方文档

A brief introduction to the submit methods

An html <form> can be sent in four ways:

Now, consider the submission of a form containing only two fields, named foo and baz. If you are using the POST method the server will receive a string similar to one of the following three examples, depending on the encoding type you are using:

However, if you are using the GET method, a string like the following will be simply added to the URL:

?foo=bar&baz=The%20first%20line.%0AThe%20second%20line.
上一篇 下一篇

猜你喜欢

热点阅读