JavaScript encountered a cross-domain error using the fetch post method

I use the following code to make a cross-domain request for the post method:

let formData= new FormData();
      for (var attr in data) {//datajson
          formData.append(attr,data[attr]);
      }
fetch(url,{
            method:method,
            mode:"cors",
            headers:{
                "Content-Type": "application/json",
                "Cross-Method": "CORS",
            },
            body: formData,
        }).then(function(res){
            console.log("fetchrequest",JSON.stringify(res.ok));
            if(res.ok){
                res.json().then(function(json){
                    console.info(json);
                    message.success(":"+":\r\n"+json);
                });
            }else{
                message.error(":"+"");
            }

        }).catch(function(e){
            message.error(":"+"");
        });

but the following error is displayed:

The

clipboard.png

clipboard.png
post parameter and the custom header I wrote have no hint at all.
returns a hint of Invalid CORS request
. I don"t know what went wrong.

Mar.20,2021

Server programs should set headers that allow cross-domain + carry.

you have provided a custom header cross-method,content-type , if you use php :

// 
header('Access-Control-Allow-Origin: *');
// 
// Access-Control-Allow-Headers :https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
header('Access-Control-Allow-headers: cross-method'); //  content-type 
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eae414-21bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eae414-21bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?