[PHP][JavaScript] Formating : I would like to set the display to none. I want to change the value of the display when the man click to the submit button. After that the form's display changes to none.
But this code is not working.
    <!DOCTYPE html>
    <?php

    include_once 'header.php'

    ?>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Submit</title>
    <link rel="stylesheet" href="style.css">
    </head>
    <body>

    <form class="submit" method="post">
      <input id="ceg" type="text" name="ceg" placeholder="Cég neve"><br>
      <input id="ceg" type="text" name="kontakt" placeholder="Kapcsolattartó neve"><br>
      <input id="ceg" type="email" name="" placeholder="Kapcsolattartó email címe"><br>
      <input id="ceg" type="text" name="" placeholder="Munkakör leírása (20 szó)"><br>
      <h1>Témakör</h1>
      <input type="radio" name="menu" value="1">1</input><br>
      <input type="radio" name="menu" value="2">2</input><br>
      <input type="radio" name="menu" value="3">3</input><br>
      <input type="submit" name="submit" value="submit" onload="myFunction">
    </form>

    <script>
      function myFunction() {
      var x = document.getElementsByClassName("submit");
      x.style.display = "none";
      }

    </script>


  </body>
</html>