函数作用域
<!DOCTYPE html>
<html>
<head>
<title> test</title>
<script type="text/javascript">
var v1 = 'global';
var f1 = function(){
alert(v1);
}
f1();
var f2 = function(){
var v1 = 'local';
f1();
};
f2();
</script>
</head>
<header>
<h1>Welcome to my homepage</h1>
<p>My name is Donald Duck</p>
</header>
<body>
<input type="button" onclick="aaa()" />
<div width="100" style="background-color:white;">test</div>
</body>
</html>