Ajax redirect problem

Why does the problem of redirection occur when using ajax to request other websites

        $.ajax({
            url:"https://www.baidu.com",
            type:"GET",
            headers:{
                "Access-Control-Allow-Origin":"*"
            },
            success:function(){
                console.log(33);
            },
            error:function(){
                console.log(344);
            }
        })
        

how to deal with this situation?

Feb.28,2021

Access-Control-Allow-Origin is the Response, set by the server. You need Baidu to configure whether the current website can cors


unless Baidu cooperates with you

.
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-1bdc074-30a4c.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-1bdc074-30a4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?