<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Study Fanction</title>
<script type="text/javascript" charset="utf-8">
//1. function语句式
function test1() {
window.document.write('test1...')
}
test1();
//2. ECMA recommend 函数直接量
var test2 = function () {
window.document.write('test2...');
}
test2();
//3. Function构造式
var test3 = new Function('a','b','return a+b;');
document.write(test3(10,20));
document.write('<br><br>');
document.write(test4);
// var test4 = function () {
// document.write('<br>'+'test2...');
// }
</script>
</head>
<body>
</body>
</html>