Javascript firestore问题,我的数据未提交我获取http 405不允许错误

Javascript firestore问题,我的数据未提交我获取http 405不允许错误,javascript,firebase,google-cloud-firestore,Javascript,Firebase,Google Cloud Firestore,我正在使用firestore,当我提交时,我得到405不允许的错误 在post方法中,我在下面附上了我的代码和错误详细信息 错误 职位 HTTP/1.1 405方法不允许1ms] 职位http://127.0.0.1:5500/signup.html [HTTP/1.1 405方法不允许1ms] 职位 状态405 方法不允许 版本http/1.1 Transferred966 B(0 B尺寸) 交叉来源时的参考源 Access-Control-Allow-Credentials true

我正在使用firestore,当我提交时,我得到405不允许的错误 在post方法中,我在下面附上了我的代码和错误详细信息

错误

职位

HTTP/1.1 405方法不允许1ms]

职位http://127.0.0.1:5500/signup.html [HTTP/1.1 405方法不允许1ms]

职位 状态405 方法不允许 版本http/1.1 Transferred966 B(0 B尺寸) 交叉来源时的参考源

Access-Control-Allow-Credentials
    true
Access-Control-Allow-Origin
    http://127.0.0.1:5500
Allow
    GET, HEAD, OPTIONS
Connection
    keep-alive
Content-Length
    0
Date
    Fri, 28 May 2021 08:57:27 GMT
Keep-Alive
    timeout=5
Vary
    Origin
    
Accept
    text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding
    gzip, deflate
Accept-Language
    en-US,en;q=0.5
Connection
    keep-alive
Content-Length
    113
Content-Type
    application/x-www-form-urlencoded
Cookie
    _ga_Z031GSPW7N=GS1.1.1622190018.7.1.1622191842.0; _ga=GA1.1.606488228.1622111224
Host
    127.0.0.1:5500
Origin
    http://127.0.0.1:5500
Referer
    http://127.0.0.1:5500/signup.html
Upgrade-Insecure-Requests
    1
User-Agent
    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
我的代码


客户注册
从“firebase/app”导入firebase;
导入“firebase/analytics”;
导入“firebase/auth”;
var firebaseConfig={
apiKey:“key”,
authDomain:“它叫god.firebaseapp.com”,
投射者:“它被称为上帝”,
storageBucket:“它叫god.appspot.com”,
messagingSenderId:“1234”,
appId:“id”,
度量标准:“id”
};
//初始化Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
const db=firebase.firestore();
const auth=firebase.auth();
常量余额=数据库集合(“用户”);
const sm=document.getElementById('submitTWO');
sm.addEventListener(“单击”,函数(){
函数寄存器(){
const name=document.getElementById('name')。值;
const date=document.getElementById('date')。值;
const email=document.getElementById('email')。值;
const password=document.getElementById('password')。值;
const number=document.getElementById('number')。值;
const address=document.getElementById('address')。值;
const ssn=document.getElementById('ssn').value;
auth().createUserWithEmailAndPassword(电子邮件,密码)。然后(函数(){
警报(“用户注册成功”);
bal.add({
姓名:姓名,,
出生日期:日期,
电邮:电邮,,
密码,
电话号码:号码(NUMBER),,
邮寄地址:地址:,
ssn:编号(ssn),
//acc_已创建:firebase.firestore.Timestamp(),
})
})
}
})
注册
名称
出生日期
电子邮件
密码
显示密码

//键入密码//
输入电话号码:



例:880566548

通讯地址
ssn


提交
将按钮更改为
提交