<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script> function f1(){ var num=10; //函数的声明 function f2(){ console.log(num); } //函数调用 f2(); } f1(); </script></head><body></body></html>