JavaScript 函数调用


JavaScript 函数调用

<html>
   <head>

      <script type = "text/javascript">
         function sayHello() {
            document.write ("Hello there!");
         }
      </script>

   </head>
   <body>
      <p>Click the following button to call the function</p>

      <form>
         <input type = "button" onclick = "sayHello()" value = "Say Hello">
      </form>

      <p>Use different text in write method and then try...</p>
   </body>
</html>