zoukankan      html  css  js  c++  java
  • input 通过 from标签请求数据

    也是直接上代码吧

       <form action="https://api.it120.cc/small4/user/m/login?deviceId=007&deviceName=monkey"    method="post">
        账户: <input type="text" name="mobile">
        密码: <input type="password" name="pwd">
        <input type="submit" @click="logo()">
        <!-- <router-link  @click.native="logo" to="">提交</router-link> -->
    </form>
    通过这种提交必须 写账号和密码否则请求不到          action是地址     method是通过什么方式请求
    账号   和密码  的name也是必填项 因为都是必填的参数   如果不填会因为缺少参数而报错
    这就是请求成功。

    请求错误的原因也很多  忘记写账户密码  等等  。。

     仅供参考。谢谢。

  • 相关阅读:
    [NOI2014]动物园
    2018.7.15模拟赛
    2018.7.13模拟赛
    [CodeForces]920F SUM and REPLACE
    [BZOJ3211]花神游历各国
    [GSS5] Can you answer these queries V
    [SPOJ1716] GSS3
    [HNOI2012]排队
    2018.7.10模拟赛
    7.3模拟赛
  • 原文地址:https://www.cnblogs.com/yangjingyang/p/11505751.html
Copyright © 2011-2022 走看看