函数

 

  function       A               ()          { }
函数体开头    函数名    传入的参数     方法


<button onclick="myFunction('Bill Gates','CEO')">点击这里</button>       //当按钮点击时,响应myfunction方法,并传入('Bill Gates','CEO')参数

<script>                                                                                             //记得传参数是  '参数'  形式。


function myFunction(name,job)                 //传入的参数按照这个规格套上,
{
alert("Welcome " + name + ", the " + job);     //从而按一下按钮,弹出welcom Bill Gates ,the CEO 。“  ”里有,
</script>

 

 

定义:
var m;
var m=1;
var m=false;
var m=1+1;

相关文章:

  • 2021-09-17
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-01-08
  • 2021-06-13
  • 2021-11-12
相关资源
相似解决方案