What is the difference between btn.onclick=st; and btn.onclick=st ();?

<!DOCTYPE html>
<html>
<head>
  <title></title>
</head>
<body>
<input type="button" value="anniu" id="btn" name="">
  <script type="text/javascript">
    var btn=document.getElementById("btn");
      function st(){
      alert("sd")
    }
    btn.onclick=st;
  </script>
</body>
</html>
When

is written as btn.onclick=st (); , the page opens and alert pops up directly. Why? How does this work?

May.22,2021

btn.onclick=st();

is equivalent to executing st () and assigning st () to btn.onclick


btn.onclick=st() 
document.getElementById('btn').onclick = function(){
 alert("sd")
}
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-1b363ee-2c008.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-1b363ee-2c008.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?