js 回调函数

来源:互联网 发布:手机淘宝海报在线制作 编辑:程序博客网 时间:2024/05/21 09:04
<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title>回调函数</title></head><body>    <script>        function testCallBack(callback){            callback();        }        function consoleInput1(callback){            console.log("---通过回调被调用的-1->>");            callback();        }        function consoleInput2(callback_1){            console.log("---通过回调被调用的-2->>");            callback_1();        }        testCallBack(consoleInput1(consoleInput2));    </script></body></html>
0 0
原创粉丝点击