使用“ typeof”检查它是否是一个函数。您可以尝试运行以下代码来检查JavaScript变量是否为函数类型:
<html> <body> <script> var res = function(){ // }; if (typeof res === "function") { alert("A function") } </script> </body> </html>
友情链接: json在线解析 通晓查询 糯晒黄历 姓名打分