<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body></body>
<script>
// 回调函数
function f1(xx) {
xx();
}
function f2() {
//
console.log("我是回调函数哦~");
}
f1(f2);
setInterval(function () {}, 1000);
</script>
</html>
运行结果