zoukankan      html  css  js  c++  java
  • XMLHttpRequest发送请求

    *open(method,url,async)

    *send(string)//在使用get请求的时候,是没有主体的,所有的信息都会拼在url当中,所以使用send的时候括号里的string可以为空!如果是使用post请求,这个send就一定要填写参数,不然就没有什么意义。
     
    request.open("get","get.php",true);//get请求
    request.send();//在发送出去
     
    request.open("post","post.php",true);//post请求
    request.send();//无参数,无意义。
     
    request.open("post","create.php",true);//post请求
    request.setRequestHeader("Content-type","application/x-www-form-urlencoded");//设置http的头信息,告诉服务器我们要发送一个表单。
    request.send("name=王二狗&sex=男");//发送请求的响应体。
  • 相关阅读:
    CVE-2019-0708
    windows powershell的常用命令
    sqli-lab(8)
    DVWA--CSP Bypass
    认清自己
    sqli-libs(7)
    DVWA--upload
    sqli-labs(6)
    python学习之路(22)
    BZOJ2434:[NOI2011]阿狸的打字机——题解
  • 原文地址:https://www.cnblogs.com/Yirannnnnn/p/4846385.html
Copyright © 2011-2022 走看看