|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
代码:
login.html:
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Login</title>
- </head>
- <body>
- <div id="login">
- <h1>Login</h1>
- <form method="POST" action="index.html">
- <input type="text" required="required" placeholder="用户名" name="u"></input>
- <input type="password" required="required" placeholder="密码" name="p"></input>
- <button class="but" type="submit">登录</button>
- </form>
- </div>
- </body>
- </html>
复制代码
index.html:
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- </head>
- <body>
- </body>
- </html>
复制代码
表单提交的时候,我用的是POST请求,报了405,后来才知道,是请求方法不对,要用GET请求,可我不想用GET请求,大家有没有其他的办法可以解决?
本帖最后由 不二如是 于 2020-8-30 16:45 编辑
不用 Get 请求,目前你的需求就无法实现
后端设计符合 Restful api 设计
|
|