<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>jiang</title> </head> <body> <button onclick="myFunction('jiang','stu')">点击这里</button> <script> function myFunction(name,job){ alert("Welcome " + name + ", the " + job); } </script> </body> </html>
Js 函数的应用