JS button click event auto-run problem?

the following is the code I wrote when I was learning, but as soon as I ran the button event in the web page JS, it ran automatically. I don"t know where I made a mistake. I looked on Baidu and saw that the button event was written like this. Please help me and see what"s wrong with my brother. Thank you.
Code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script src="main.js"></script>
    <style>
        div{
            width: 200px;
            height: 200px;
            background: -sharp998820;
        }
    </style>
    <script>
        window.onload = function(){
            var oBut_1=document.getElementById("obut_1");
            var oBut_2 = document.getElementById("obut_2");
            var oBut_3 = document.getElementById("obut_3");

            function Gored(odiv_qu, property, price, shebiao){
            var oDiv = document.getElementById(odiv_qu);
            oDiv.style.background = shebiao;
            oDiv.style[property] =price; 
            
              }
              alert(oBut_1);
            oBut_1.onclick = alert("sdsd");
            oBut_1.onclick=Gored("oDiv_s", "width", "25rem", "green");
            oBut_2.onclick=Gored("oDiv_s", "height", "15rem", "-sharp003320");
            oBut_3.onclick=Gored("oDiv_s"," ", " ", "-sharp022545");
        } 
        
    </script>
</head>
<body>
    <input id="obut_1" type="button" value=""  />
    <input id="obut_2" type="button" value="" />
    <input id="obut_3" type="button" value=""  />
    <div id="oDiv_s"></div>
</body>
</html>
Mar.23,2021

you wrote alert ("sdsd"); , Gored ('oDiv_s',' width', '25remand,' green'); are all function execution statements , onclick needs to be bound to a function, like this: oBut_1.onclick = function () {alert ("sdsd");}


oBut_1.onclick = function() {
                Gored('oDiv_s', 'width', '25rem', 'green');
            };
            oBut_2.onclick = function() {
                Gored('oDiv_s', 'height', '15rem', '-sharp003320');
            }
            oBut_3.onclick = function() {
                Gored('oDiv_s',' ', ' ', '-sharp022545');
            }

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