案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<p>点击这个按钮,来调用带参数的函数。</p>
6
7
<button onclick="myFunction('Bill Gates','CEO')">点击这里</button>
8
9
<script>
10
function myFunction(name,job)
11
{
12
alert("Welcome " + name + ", the " + job);
13
}
14
</script>
15
16
</body>
17
</html>
18