SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html>
  <body>
    <p>点击这个按钮,来调用带参数的函数。</p>
    
    <button type="button" onclick="myFunction('Bill Gates','CEO')">Click here</button>
    <button type="button" onclick="myFunction('Bob','Builder')">Click here</button>
    
    <script>
    	function myFunction(name,job){
        alert("Welcome "+name+",the "+job);
      }
    </script>
  </body>
</html>